Menu

#13 Patch to allow foreign functions to return foreign objects

open
nobody
None
5
2014-10-04
2014-10-04
No

Hi
To use TinyScheme as an imbedded language we needed foreign functions to be able to return foreign objects, such as database connections, sockets, image buffers and suchlike, which could then be used in subsequent calls to foreign functions. We also found it useful to be able to print them out, so we made a system for creating foreign objects which have a registered finalizer (called by the garbage collector) and string conversion (called by print/write, so you can display something like #<database-connection> as appropriate). Please see the attached patch. I hope others will find it useful.
Many thanks,
Thomas Munro

1 Attachments

Discussion


Log in to post a comment.