Closed xiaobiaozhao closed 2 years ago
@xiaobiaozhao do you know that it won't get JIT compiled? Also, it should be protected by macros like LUAJIT_ENABLE_LUA52COMPAT
, depending on what versions of Lua the feature is from.
But why don't you use FFI and C library to expose such features? I don't see why the pack/unpack functions must be in the LuaJIT VM core, especially when they cannot even be JIT compiled. Using FFI to call C can be JIT compiled BTW.
In conclusion, I don't think this is a good idea at all unless you can convince Mike Pall to include this in the upstream LuaJIT (which I highly doubt due to the reasons above).
BTW, you can use LuaJIT's FFI to do pack and unpack easily already.
Thx, @agentzh .