On Thu, Jul 31, 2008 at 1:39 PM, felix winkelmann <[EMAIL PROTECTED]> wrote: > The C_alloc is a macro that actually does alloca(), so you are allocating > stack data that is not live after returning from the function. You will
Hmm, I thought C_return made that OK, because it's normal for objects to live on the stack. But you are saying that's only true if I use foreign-primitive? > either have to use `foreign-primitive`(to create a CPS function), or Why don't you prefer that approach? > pass a pre-allocated pair (which I recommend): > > C_word g2d_glyphs_baseline(struct G2dGlyphs* glyphs, C_word p) > { > C_set_block_item(p, 0, C_fix(10)); > C_set_block_item(p, 1, C_fix(256)); > return p; > } > > (completely untested) > > > cheers, > felix > _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users