|Subject:||Re: [Chicken-users] Chicken C interface|
|Date:||Thu, 6 Jun 2013 10:54:38 +0900|
Well, it works and I haven't had problems. What's the correct way to go about this?
On 6/5/2013 2:36 PM, Felix wrote:
From: Dan Leslie <address@hidden>
Subject: Re: [Chicken-users] Chicken C interface
Date: Wed, 05 Jun 2013 08:47:45 -0700
I do this a fair bit in the Allegro egg.Note that this code is not correct: C_alloc allocates on the C stack and the
Here's an example:
Basically, use C_alloc to allocate the memory required to host both
the List structure and the data it is to contain, then use the C_list
macro to patch it all together.
data will be invalid once the function returns (Sorry). If this works, then
it is just coincidental!
Chicken-users mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|