[Chicken-users] assigning scheme object to foreign pointer

2013-12-15 Thread pluijzer
Hello everybody. I am using a C-library that lets you assign user data to objects via a void pointer. I would like to assign a scheme object to this pointer, but as I understand I cannot use 'object-pointer' for this, as the garbage collector might move the object. Is there another way to

Re: [Chicken-users] assigning scheme object to foreign pointer

2013-12-15 Thread Thomas Chust
On 2013-12-16 00:59, pluijzer wrote: [...] I am using a C-library that lets you assign user data to objects via a void pointer. I would like to assign a scheme object to this pointer, but as I understand I cannot use 'object-pointer' for this, as the garbage collector might move the

Re: [Chicken-users] assigning scheme object to foreign pointer

2013-12-15 Thread Evan Hanson
Hi Pluijzer, On 16/12/13 12:59, pluijzer wrote: I am using a C-library that lets you assign user data to objects via a void pointer. I would like to assign a scheme object to this pointer, but as I understand I cannot use 'object-pointer' for this, as the garbage collector might move the

Re: [Chicken-users] assigning scheme object to foreign pointer

2013-12-15 Thread pluijzer
Hello Evan and Thomas, Thank you for your suggestions, I decided to go for `CHICKEN_new_gc_root` and it works like I hoped. I was the lookup-table before but found it to be too unwieldy in my project. Thanks again, Pluijzer On Mon, 16 Dec 2013 13:28:27 +1300 Evan Hanson ev...@foldling.org