Skip to content
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

Great changes #187

Closed
wants to merge 1 commit into from
Closed

Great changes #187

wants to merge 1 commit into from

Conversation

guidanoli
Copy link
Contributor

It's basically a diff between my fork and the original repo

Legend: +additions -removals *changes
+ stack context handler (locks runtime, checks extra slots in stack and restores stack top)
+ better panic function (prints the Python stack before Lua aborts the program)
+ proper error handling between Lua and Python
+ wraps Python exceptions + tracebacks in a _PyException object
+ converts Lua traceback to Python traceback
+ python.exec (lupa.LuaRuntime.execute counterpart)
+ 'register_exec' option, defaults to True
+ python.PYTHON_VERSION (lupa.LUA_VERSION counterpart)
+ python.pack (Lua values -> Python tuple, like table.pack)
+ python.unpack (Python tuple -> Lua values, like table.unpack)
+ python.is_object (for checking if Lua value is a wrapped Python object)
+ python.is_error (for checking if Lua value is a wrapped _PyException object)
+ adds assertions for catching Lua C API misuses (e.g. indexing non-tabular value)
+ caches Lua objects
+ add tests
+ add '--gdb-debug' option for compiling with gdb debug information
* made names in the registry more descriptive to avoid conflicts
* simplified library registration
* simplified _LuaObject getter/setter/delete methods
* use lua_pushglobaltable for Lua 5.2+
* made lock_runtime return 0 on error, instead of raising error
* simplified _LuaThread.__bool__ and resume_lua_thread
* overflow handler defaults to returning wrapped Python integer to Lua
* py_to_lua raises an error instead of returning 0
* py_to_lua_custom raises an error instead of returning 0
* calling Lua functions from Python doesn't need to set stack top to 0
* unpack_multiple_lua_results (now py_tuple_from_lua) works with top 'nargs' elements
* make python.args be usable only in the last position to respect Lua semantics
- _LuaCoroutineFunction (messes up Lua caching)

@guidanoli
Copy link
Contributor Author

I know this is a lot, but could you review this PR, @scoder?

@scoder
Copy link
Owner

scoder commented Jul 16, 2021

Sorry, no. I don't have the time to review that amount of changes. Even worse, they're literally mixed together into one big commit, which makes it impossible to know why a specific piece of code was changed.

If you can cut the changes down into separate feature/fix PRs, I can try to review those.

As it stands, I cannot possibly review this, let alone merge it.

@scoder scoder closed this Jul 16, 2021
@guidanoli guidanoli deleted the feat/lua-cache branch July 16, 2021 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants