diff --git a/basis/alien/complex/functor/functor.factor b/basis/alien/complex/functor/functor.factor index 33a651a19c..8a6d862cdf 100644 --- a/basis/alien/complex/functor/functor.factor +++ b/basis/alien/complex/functor/functor.factor @@ -1,32 +1,22 @@ ! Copyright (C) 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors alien alien.c-types classes.struct functors -kernel math math.functions quotations ; +USING: functors2 ; IN: alien.complex.functor - ( z -- alien ) + >rect ${T}-class >c-ptr ; - DEFINES <${T}> -*T DEFINES *${T} - -WHERE - -STRUCT: T-class { real N-type } { imaginary N-type } ; - -: ( z -- alien ) - >rect T-class >c-ptr ; - -: *T ( alien -- z ) +: *${T} ( alien -- z ) T-class memory>struct [ real>> ] [ imaginary>> ] bi rect> ; inline -T-class lookup-c-type - 1quotation >>unboxer-quot -*T 1quotation >>boxer-quot +${T}-class lookup-c-type +<${T}> 1quotation >>unboxer-quot +*${T} 1quotation >>boxer-quot complex >>boxed-class drop -;FUNCTOR> +]] \ No newline at end of file