fix alien.complex unboxer

db4
Joe Groff 2009-08-29 23:18:31 -05:00
parent 762a8c32cb
commit be406fa964
2 changed files with 4 additions and 2 deletions

View 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

View 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