[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] return a pair of ints from a C function?
From: |
Shawn Rutledge |
Subject: |
Re: [Chicken-users] return a pair of ints from a C function? |
Date: |
Thu, 31 Jul 2008 23:18:54 -0700 |
On Thu, Jul 31, 2008 at 12:46 AM, Ivan Raikov <address@hidden> wrote:
>
> To return fixnums, you can do:
>
> C_word g2d_glyphs_baseline(struct G2dGlyphs* glyphs)
> {
> C_word* a = C_alloc(C_SIZEOF_PAIR);
> C_return(C_pair (&a, C_fix(10), C_fix(256)));
> }
Thanks. But it appears there is the problem Felix is referring to,
that it's only on the stack (although I thought that was OK for it to
be on the stack): when I ran this C function from a Scheme wrapper I
got
(10 . #<procedure>)