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

Add 'name' and 'mode' arguments to LuaRuntime.{eval,execute,compile} #252

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

scoder
Copy link
Owner

@scoder scoder commented Dec 10, 2023

These allow finer control of input and debug output.

Closes #248

…to allow finer control of input and debug output.

Closes #248
"""Run Lua code with arguments"""
cdef lua_State* L = runtime._state
cdef const char* c_name = b'<python>'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line I would change to

Suggested change
cdef const char* c_name = b'<python>'
cdef const char* c_name = b'=<python>'

or

Suggested change
cdef const char* c_name = b'<python>'
cdef const char* c_name = NULL

for the reason explained here.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen your comment but it would introduce an incompatible change. It would break doctests, for example, or code that tries to parse Lua errors.

@scoder scoder added this to the 2.1 milestone Dec 11, 2023
@scoder scoder merged commit 27ff097 into master Dec 11, 2023
176 checks passed
@scoder scoder deleted the gh248_load_mode branch December 11, 2023 16:56
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.

Expose Lua load arguments (mode and chunkname)
2 participants