Re: Crash in callbacks on iOS 5.1

  • From: Mike Pall <mike-1206@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 11 Jun 2012 01:23:23 +0200

Fjölnir Ásgeirsson wrote:
> Oh wow, this is quite the blow.
> They worked on the dev device I was using so I've got quite a
> bit of code depending on them.
> Is it possible to have the id of a function passed to a c
> function over ffi? (So I could simply augment my existing
> callback code with lua support)

Umm, an id of what kind of function? A Lua function: nope, that's
what the callback feature is needed for. But you can pass some
other C function as a callback argument, of course.

But note the C callback must *not* use the classic Lua/C API, if
you called the C function that takes a callback via the FFI. It's
probably easier to stay with the classic Lua/C API for the parts
of the code that deal with callbacks.

--Mike

Other related posts: