]> gitweb.factorcode.org Git - factor.git/commitdiff
fix alien.complex unboxer
authorJoe Groff <arcata@gmail.com>
Sun, 30 Aug 2009 04:18:31 +0000 (23:18 -0500)
committerJoe Groff <arcata@gmail.com>
Sun, 30 Aug 2009 04:18:31 +0000 (23:18 -0500)
basis/alien/complex/functor/functor.factor
basis/classes/struct/struct.factor

index cb66175a29817717b28a1466013893528f8f3464..b05059e9cbff1ae5dd8760023a3c13ba57510f45 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.structs alien.c-types classes.struct math
+USING: accessors alien alien.structs alien.c-types classes.struct math
 math.functions sequences arrays kernel functors vocabs.parser
 namespaces quotations ;
 IN: alien.complex.functor
@@ -17,7 +17,7 @@ WHERE
 STRUCT: T-class { real N } { imaginary N } ;
 
 : <T> ( z -- alien )
-    >rect T-class <struct-boa> ;
+    >rect T-class <struct-boa> >c-ptr ;
 
 : *T ( alien -- z )
     T-class memory>struct [ real>> ] [ imaginary>> ] bi rect> ; inline
index 4238230e16703defa77dda049f1e07a8866f7c8b..99150e9bb68be795310deda617aee80fb573607b 100644 (file)
@@ -110,6 +110,8 @@ M: struct-class reader-quot
 M: struct-class writer-quot
     nip (writer-quot) ;
 
+! c-types
+
 <PRIVATE
 : struct-slot-values-quot ( class -- quot )
     struct-slots