Re: getting Lua state in FFI function

  • From: Stefan Hett <stefan@xxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 18 Apr 2013 10:43:32 +0200

Or maybe more a concrete question:
Is there a way to get the lua callstack in an function called via the FFI, so we'd issue a useful error message showing which script (linenumber/function) made the call?

If not, did s/o already handle the case in some other way?

Regards,
Stefan

Hi,

When calling my FFI-bound function void Foo(), I'd like to know from which luastate the call was issued. Is there an easy way to get the luastate?

I couldn't find anything in the documentation or on the web. Did I overlook something?

Regards,
Stefan




Other related posts: