-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatible Layer Compiler Errors While Using MoonJIT #967
Comments
Is there a MoonJIT-specific macro I can use for the first case? The second I can happily fix up. |
I don't believe so, they just forked LuaJIT with a new name and continued some development. The actual Lua header and usage remains the same/unchanged, and the Lua versioning variables/macros are left as LUAJIT_ prefixed. #define LUAJIT_VERSION "moonjit 2.2.0"
#define LUAJIT_VERSION_NUM 20200 /* Version 2.2.0 = 02.02.00. */
#define LUAJIT_VERSION_SYM moonjit_version_2_2_0
#define LUAJIT_COPYRIGHT "Copyright (C) 2019-2020 moonjit developers"
#define LUAJIT_URL "https://github.com/moonjit/moonjit" You could base it on the values, but that may be a bit more annoying to maintain. |
I've left an issue in the MoonJIT repository. If I don't get a simple answer then the hackery begins. |
Spicy: moonjit/moonjit@d7784a3 We can now just check for |
Ultimately up to you, but LuaJIT stock will probably have the same issues. I am looking into other libraries than sol at this point though as sol does not seem to deal with coroutines well from the C side. |
Fair enough! Good luck. |
This is taken care of. |
Didn't want to make a pull request to fix this without first seeing if there is something I am missing config wise that would avoid this. I am new to sol3, and still getting used to how it is setup.
Environment setup:
The Lua 5.3 compat header has two errors in it while making use of MoonJIT which can be easily fixed. However, I am not sure if this is the appropriate fix for this, or if I am just overlooking a define.
The errors are:
Second is only a warning by default, but I generally compile with warnings as errors.
The first can be fixed by assuming LuaJIT is the only time this issue will be seen, as I did not have it while compiling with stock Lua. So I fixed that via:
The second is fixed by just checking for existing definitions like the other functions near it:
Edit; sorry forgot to include a small snippet:
This is enough to produce these errors. Include paths point to sol and moonjit accordingly.
The text was updated successfully, but these errors were encountered: