On Thu, Jul 31, 2008 at 3:59 PM, felix winkelmann <[EMAIL PROTECTED]> wrote:
>>> either have to use `foreign-primitive`(to create a CPS function), or
>>
>> Why don't you prefer that approach?
>
> Well, the pass-the-box approach appeared simpler, but foreign-primitive
> is probably the cleaner approach and doesn't require you to create
> a wrapper function.

Thanks for your help.

This works:

(define g2d_glyphs_baseline (foreign-primitive scheme-object
((g2d-glyph-vector glyphs))
        "C_word* a = C_alloc(C_SIZEOF_PAIR);
        return(C_pair (&a, C_fix(10), C_fix(256)));" ))

but is there a way to do it in a C source file rather than having to
write C inside quotes?


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to