[gambit-list] How to properly allocate foreign object?
Jörg F. Wittenberger
Joerg.Wittenberger at softeyes.net
Sat Apr 11 06:16:01 EDT 2020
Thanks for your reply.
On Fri, 10 Apr 2020 15:49:15 -0400
Marc Feeley <feeley at iro.umontreal.ca> wrote:
> There are a few issues with your code. First of all, you should use
> “___return(…);” to return a result (the assignment to
> ___result_voidstar is deprecated).
OK. Is there some documentation wrt. these things?
> An alternative would be to create your own type with a release
> function, but that is probably overkill in this situation.
Interesting: you consider a type with release function to be the
overkill? I had the impression that the use of wills would be the
overly complex way.
Nevertheless: In your suggestion you still use malloc to allocate. I
do see situations where I'd tend to do this too. Still I wonder if it
was cheaper/faster to allocate on the Scheme heap. And if so, how?
Jörg
More information about the Gambit-list
mailing list