Re: [Chicken-users] Making stack-allocated Chicken-managed objects from C

2012-03-10 Thread Felix
I have been poking into the chicken-bind egg and I'd like to modify it slightly for my libraries' (Box2D, Chipmunk) heavy use of structs. Chicken-bind will generate helper utils for making C-structs inside Chicken. Please take a peek at

[Chicken-users] Making stack-allocated Chicken-managed objects from C

2012-03-06 Thread Kristian Lein-Mathisen
Hi guys! I would like to get a deeper understanding of Chicken's GC and its stack-allocation feature. I've numbered by questions, feel free to answer just one or two of them! I have been poking into the chicken-bind egg and I'd like to modify it slightly for my libraries' (Box2D, Chipmunk) heavy

Re: [Chicken-users] Making stack-allocated Chicken-managed objects from C

2012-03-06 Thread John Cowan
Kristian Lein-Mathisen scripsit: My C-snipped in foreign-primitive that's doing the stack-allocation is heavily inspired by http://wiki.call-cc.org/allocating-c-structures-under-control-of-the-chicken-gc. However, I've been getting feedback about this approach about it not being completely

Re: [Chicken-users] Making stack-allocated Chicken-managed objects from C

2012-03-06 Thread Jim Ursetto
On Mar 6, 2012, at 10:31 AM, Kristian Lein-Mathisen wrote: (define %make-point (foreign-primitive void (((c-pointer (struct point)) dest) (float x) (float y)) #END dest-x = x; dest-y = y; C_return(); END )) (define (make-point x y)