Replies: 1 comment 5 replies
-
There is definitely going to be an issue that's not just limited to this enum if you link both Luau and Lua or compile a third-party library against lua.h from Lua but link Luau. Depending on build system settings there may be conflicts between various functions, and the virtual machines are not interoperable apart from having a similar interface. This is similar to linking multiple versions of Lua 5.x into the same binary. If Lua 5.1 is compiled as C and Luau is compiled as C++, then I think things will happen to work because of different mangling. In this case specifically LUA_GC* values should also not be an issue unless I'm misunderstanding the question. |
Beta Was this translation helpful? Give feedback.
-
Hi, and thank you for this library!
I have a question regarding the interface of
lua_gc()
.Overall, it looks like that the
lua.h
header from both Luau and Lua 5.1 are mostly the same.However, I noticed that the enums being passed to the
lua_gc()
function have different values:Luau:
Lua 5.1:
E:g.
LUA_GCSTEP
has different values.My concern is regarding other 3rd party libraries having built with Lua 5.1, and us switching out the VM to Luau.
It should work as long as the public api's are the same, and this is one such case where it feels like an issue.
What are your thoughts around this. Is this something that is in line with your design goals for Luau?
Would you consider a PR for this enum?
Are there other areas where you would see a similar issue between the headers?
Regards,
Mathias
Beta Was this translation helpful? Give feedback.
All reactions