4 ms·
there are no trampoline slots required. it's a function pointer that's provided as an argument (user data). Can you point to an FFI that doesn't support callb
by dekhn 10y ago
there are no trampoline slots required. it's a function pointer that's provided as an argument (user data). Can you point to an FFI that doesn't support callbacks in this way? This would be a major problen in the FFI implementation.
- ihnorton 10y agoLuaJIT limits both the number of registered callbacks [1], and re-entering the interpreter from a JIT'd callback [2] (it will try to detect and prevent JIT for such functions, but if that fails you get a panic). [1] http://stackoverflow.com/questions/31042530/why-does-luajit-produce-a-too-many-callbacks-error-from-this-simple-code http://stackoverflow.com/questions/31042530/why-does-luajit-... [2] http://stackoverflow.com/questions/25924755/c-and-lua-unprotected-error-bad-callback-how-is-this-possible http://stackoverflow.com/questions/25924755/c-and-lua-unprot...
- dekhn 10y agothat's a limitation of a specific FFI, which is apparently a deisgn choice motivated by limited memory systems.
- malkia 10y agoYes, sorry - I'm simply speaking as an user of a given language runtime connecting to "C" exported functions. I understand that given a different implementation this would've not be needed.