[Openmcl-devel] nonglobal ffi callbacks?

Ron Garret ron at flownet.com
Thu Aug 13 07:49:39 PDT 2009


How about:

(defvar *callback* nil)

(define-callback callback ... (funcall *callback* ...))

(let ((*callback* ...) ...)

rg

On Aug 12, 2009, at 10:01 PM, Michael Kohout wrote:

> Hi all-
>
> I've got a problem that is screaming out for scoped ffi  
> callbacks(it's for a plugin system I'm developing for a web app).   
> In my gleaning of the docs, I concluded ccl doesn't appear to  
> support this out of the box.  Is this in fact the case?  If not, is  
> there any way I can ape it?  I don't care if it's portable code.
>
> Ideally, what I'd like to end with is something I can wrap in a let:
>
> (let ((somecallback  (define-callback ....)))
>             ;;set up, run, and clean up plugin interpreter(lua and  
> python)
> );;gc the callback
>
> Thanks for any suggestions.
> Mike Kohout
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list