28 Oct
2009
28 Oct
'09
14:58
I don't think these macros are documented. You can just use the ___BODY macro. It will give you a ___WORD* pointer to the body of any subtyped scheme object. As for having a scheme object body allocated with malloc, I think it would probably behave badly with the garbage collector. If you want to allocate a scheme object in c, check the ___alloc_scmobj in lib/mem.c As an example let's check what the ##make-vector function does in lib/_kernel.scm ___SCMOBJ result = ___alloc_scmobj (___sVECTOR, n<<___LWS, ___STILL); I'm showing you how it allocates the still object as it is the simplest case.