-
Notifications
You must be signed in to change notification settings - Fork 238
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
upgrade header files to Lua 5.4 #1436
upgrade header files to Lua 5.4 #1436
Conversation
Almost all of the symbols in this file was from 5.2. This will obviously not work because some function signatures have changed and some have completely wrong return values, etc. This commit updates the header files to Lua 5.4 based on the source code and changes a few things.
I haven't exported more symbols from Lite XL side yet. I would do it in another PR. If you want it here, please tell me. |
Will give this a proper test later with some native plugins and see how it rolls |
Tested by compiling the
|
@jgmdev can you retry? The fix should work on GCC and clang. Not sure about MSVC yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* refactor(native_api_header): upgrade header files to Lua 5.4. Almost all of the symbols in this file was from 5.2. This will obviously not work because some function signatures have changed and some have completely wrong return values, etc. This commit updates the header files to Lua 5.4 based on the source code and changes a few things. * refactor(plugin_api): move the header into include/ * fix(lite_xl_plugin_api.h): include stdlib to avoid errors with exit * refactor(lite_xl_plugin_api.h): do not return in SYMBOL_WRAP_CALL * fix(lite_xl_plugin_api.h): fix wrong way of passing varargs * fix(lite_xl_plugin_api.h): fix differing lua_rawlen definition * fix(lite_xl_plugin_api.h): fix fallback function signature * fix(lite_xl_plugin_api.h): fix conversion from void * to function pointer
* refactor(native_api_header): upgrade header files to Lua 5.4. Almost all of the symbols in this file was from 5.2. This will obviously not work because some function signatures have changed and some have completely wrong return values, etc. This commit updates the header files to Lua 5.4 based on the source code and changes a few things. * refactor(plugin_api): move the header into include/ * fix(lite_xl_plugin_api.h): include stdlib to avoid errors with exit * refactor(lite_xl_plugin_api.h): do not return in SYMBOL_WRAP_CALL * fix(lite_xl_plugin_api.h): fix wrong way of passing varargs * fix(lite_xl_plugin_api.h): fix differing lua_rawlen definition * fix(lite_xl_plugin_api.h): fix fallback function signature * fix(lite_xl_plugin_api.h): fix conversion from void * to function pointer
* refactor(native_api_header): upgrade header files to Lua 5.4. Almost all of the symbols in this file was from 5.2. This will obviously not work because some function signatures have changed and some have completely wrong return values, etc. This commit updates the header files to Lua 5.4 based on the source code and changes a few things. * refactor(plugin_api): move the header into include/ * fix(lite_xl_plugin_api.h): include stdlib to avoid errors with exit * refactor(lite_xl_plugin_api.h): do not return in SYMBOL_WRAP_CALL * fix(lite_xl_plugin_api.h): fix wrong way of passing varargs * fix(lite_xl_plugin_api.h): fix differing lua_rawlen definition * fix(lite_xl_plugin_api.h): fix fallback function signature * fix(lite_xl_plugin_api.h): fix conversion from void * to function pointer
Old header. New Lua. Me compile no work.
Updated the function prototypes, macros and structures to Lua 5.4.
Polyfills for backward compatibility with other Lua versions are removed.
lite_xl_plugin_init is now extern so that dlls with multiple entrypoints (eventually) can use it.
I've tested this new header with cffi-lua and ltreesitter.
No warnings.
Requires #1440.