Eliot, I have a lot of FFI code already written, so I am hoping to drop Alien callbacks into FFI, and a structure is being a real pain. I'll try you suggestion below, and then maybe alter the struct definition to contain integers vs. a pointer, into which FFI is making *certain* that I put only external addresses.
After moving to 1.3, I had to tweak some things where I originally passed null pointers, and now integers appear to be required :( Similar forces might be at work here. CogVM, Ubuntu Lucid. Thanks! Bill ________________________________ From: [email protected] [[email protected]] on behalf of Eliot Miranda [[email protected]] Sent: Wednesday, March 21, 2012 8:18 PM To: [email protected] Subject: Re: [Pharo-project] Alien callback thunk as ExternalAddress? On Wed, Mar 21, 2012 at 4:01 PM, Schwab,Wilhelm K <[email protected]<mailto:[email protected]>> wrote: I am getting near to jumping off the callback cliff. My problem is that I have a generated external structure that expects a void pointer (actually a function pointer). The setter sends #getHandle. I tried to hot-wire that by defining CallbackThunk>>getHandle to answer the #address. But FFICallbackThunk already implements address (inherited from Alien). Why getHandle? Is there a way to get an ExternalAddress that points to the thunk? Should I even be asking this question? :) I *think* it should be ExternalAddress new fromInteger: anFFICallbackThunk address Bill -- best, Eliot
