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
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
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
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)