result-pointer
hi, i'm wondering where i might find any examples of using a result-pointer in define-foreign-function? i'm not quite clear on how to specify it.
thanks
Are you aware of the examples in /Applications/LispWorks 7.1 (64-bit)/Library/lib/7-1-0-0/examples/fli/ (on Mac, lib/… on others, I think)? When looking at FLI, it helps to know C (and assembler???). If you’re still confused, ask again. I’ve successfully used FLI in earlier versions of LW and just need to check how LW7 differs from the earlier versions (assuming that you’re using LW7 - it not, please specify and give pointers to version-specific manuals). Include specific refs (urls?) to documentation. A specific example of what you want to do, might help (without something specific to chew on, the explanations might become unhelpfully large). I haven’t found “result-pointer” in my docs yet, but I would guess that it means returning a non-scalar object from C. “Scalar” means something that is the size of an address (e.g. an Int, or Char, and not a user-defined struct). IIRC, if you are getting a pointer back from C, then you probably need to pre-allocate space from the heap and pass a pointer to it into C, so that C can copy the data over and not run afoul of the GC. Again, I’m working from memory so YMMV. pt > On 19 Jan 2019, at 03:09, nate wong <natewong1231@gmail.com> wrote: > > hi, i'm wondering where i might find any examples of using a result-pointer in define-foreign-function? i'm not quite clear on how to specify it. > > thanks _______________________________________________ Lisp Hug - the mailing list for LispWorks users lisp-hug@lispworks.com http://www.lispworks.com/support/lisp-hug.html