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

Better error handling for calls to Lua functions from Python #189

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary import
  • Loading branch information
guidanoli committed Jul 26, 2021
commit 01a7db64b72b29aea75fddad143e3db978de263f
6 changes: 3 additions & 3 deletions lupa/_lupa.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ cdef extern from *:
cdef object exc_info
from sys import exc_info

cdef object format_exception, print_stack
from traceback import format_exception, print_stack
cdef object format_exception
from traceback import format_exception

cdef object CodeType
from types import CodeType
Expand Down Expand Up @@ -2127,7 +2127,7 @@ cdef int py_push_iterator(LuaRuntime runtime, lua_State* L, iterator, int type_f
try:
check_lua_stack(L, 3)
# push the iterator function
lua.lua_pushcfunction(L, <lua.lua_CFunction>py_iter_next)
lua.lua_pushcfunction(L, py_iter_next)
# push the wrapped iterator object as for-loop state object
if runtime._unpack_returned_tuples:
type_flags |= OBJ_UNPACK_TUPLE
Expand Down