]> gitweb.factorcode.org Git - factor.git/commitdiff
classes.struct: rename (init-struct) to init-struct.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 16 Aug 2015 04:40:39 +0000 (21:40 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 16 Aug 2015 04:40:39 +0000 (21:40 -0700)
basis/classes/struct/struct.factor

index 63c3fd159c1c7afa4bd39e866601326f33f02ba4..c0ff394d5a41e159bce70cfa704c534e7db980ad 100644 (file)
@@ -74,21 +74,23 @@ M: struct hashcode*
     [ heap-size read ] [ memory>struct ] bi ;
 
 <PRIVATE
-: (init-struct) ( class with-prototype: ( prototype -- alien ) sans-prototype: ( class -- alien ) -- alien )
+
+: init-struct ( class with-prototype: ( prototype -- alien ) sans-prototype: ( class -- alien ) -- alien )
     '[ dup struct-prototype _ _ ?if ] keep memory>struct ; inline
+
 PRIVATE>
 
 : (malloc-struct) ( class -- struct )
     [ heap-size malloc ] keep memory>struct ; inline
 
 : malloc-struct ( class -- struct )
-    [ >c-ptr malloc-byte-array ] [ 1 swap heap-size calloc ] (init-struct) ; inline
+    [ >c-ptr malloc-byte-array ] [ 1 swap heap-size calloc ] init-struct ; inline
 
 : (struct) ( class -- struct )
     [ heap-size (byte-array) ] keep memory>struct ; inline
 
 : <struct> ( class -- struct )
-    [ >c-ptr clone ] [ heap-size <byte-array> ] (init-struct) ; inline
+    [ >c-ptr clone ] [ heap-size <byte-array> ] init-struct ; inline
 
 MACRO: <struct-boa> ( class -- quot: ( ... -- struct ) )
     [