]> gitweb.factorcode.org Git - factor.git/blobdiff - unmaintained/alien/marshall/structs/structs.factor
tools.test: Make the flag public. Finish porting tester changes to fuzzer.
[factor.git] / unmaintained / alien / marshall / structs / structs.factor
index 3f9c8e3a7ef09206565b249e249436b95d653733..07ebb6a0cad13fa68cf39c8b8614c6f8264f3f91 100644 (file)
@@ -16,7 +16,7 @@ IN: alien.marshall.structs
     define-struct-accessor ;
 
 : define-struct-setter ( class name word type -- )
-    [ "(>>" prepend ")" append ] 2dip
+    [ "<<" append ] 2dip
     marshaller [ underlying>> ] \ bi* roll 4array >quotation
     define-struct-accessor ;
 
@@ -27,21 +27,21 @@ IN: alien.marshall.structs
 
 : define-struct-constructor ( class -- )
     {
-        [ name>> "<" prepend ">" append create-in ]
+        [ name>> "<" prepend ">" append create-word-in ]
         [ '[ _ new ] ]
-        [ name>> '[ _ malloc-object >>underlying ] append ]
+        [ name>> '[ _ malloc-struct >>underlying ] append ]
         [ name>> 1array ]
     } cleave { } swap <effect> define-declared ;
 PRIVATE>
 
 :: define-struct-tuple ( name -- )
-    name create-in :> class
+    name create-word-in :> class
     class struct-wrapper { } define-tuple-class
     class define-struct-constructor
     name c-type fields>> [
         class swap
         {
-            [ name>> { { CHAR: space CHAR: - } } substitute ]
+            [ name>> H{ { CHAR: space CHAR: - } } substitute ]
             [ type>> ] [ reader>> ] [ writer>> ]
         } cleave define-struct-accessors
     ] each ;