Re: Using a cl_object in Lisp

2018-07-30 Thread Stewart M.
Hello Marius, This was very helpful, thank you! > Hi Stewart, > > cl_object's are declared as :object type in ECL's ffi, so > > (ffi:def-function "getObject" ((lo :pointer-void)) :returning :object) > (ffi:def-function "setObject" ((lo :pointer-void) (clo :object))) > > should work. CFF

Re: Using a cl_object in Lisp

2018-07-29 Thread Stewart M.
I found a link to a similar question: https://stackoverflow.com/questions/44494613/embeddable-common-lisp-ecl-load-shared-library-with-extension-functions I was looking for a more direct way. -- Stewart Milberger Kavalogic, Inc.

Re: Using a cl_object in Lisp

2018-07-29 Thread Marius Gerbershagen
Hi Stewart, cl_object's are declared as :object type in ECL's ffi, so (ffi:def-function "getObject" ((lo :pointer-void)) :returning :object) (ffi:def-function "setObject" ((lo :pointer-void) (clo :object))) should work. CFFI does not support this as far as i know. Hope that helps, Mari

Re: Using a cl_object in Lisp

2018-07-28 Thread Stewart M.
To clarify, the issue is not with C++, which I am successfully wrapping with C. The actual issue is using the c_object type in Lisp--if it comes back as a CFFI pointer, how can I use it in Lisp as a Lisp object? Is there something like: (ffi:pointer-to-lisp-object ptr) -- Stewart Milberger K