]> gitweb.factorcode.org Git - factor.git/commitdiff
coercers and array type relations for c-type classes
authorJoe Groff <joe@victoria.(none)>
Thu, 13 Aug 2009 17:33:22 +0000 (13:33 -0400)
committerJoe Groff <joe@victoria.(none)>
Thu, 13 Aug 2009 17:33:22 +0000 (13:33 -0400)
extra/classes/struct/struct.factor

index 4c94c826db1da144f8ce9dff3663eca30a368c7a..e2d2c336674dd3a4784cd2f241f29f4676d6bd26 100644 (file)
@@ -4,7 +4,7 @@ classes.c-types classes.parser classes.tuple
 classes.tuple.parser classes.tuple.private combinators
 combinators.smart fry generalizations generic.parser kernel
 kernel.private libc macros make math math.order quotations
-sequences slots slots.private words ;
+sequences slots slots.private struct-arrays words ;
 IN: classes.struct
 
 ! struct class
@@ -117,6 +117,9 @@ M: struct-class c-type-unboxer-quot
 M: struct-class heap-size
     "struct-size" word-prop ;
 
+M: struct-class direct-array-of
+    <direct-struct-array> ;
+
 ! class definition
 
 : struct-prototype ( class -- prototype )