Skip to content

Add load/loadfile etc. wrappers #236

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

Merged
merged 20 commits into from
Jan 23, 2022
Merged

Conversation

jugglerchris
Copy link
Collaborator

This is work in progress implementing #116 . Some tests are still missing.

* Add Function::dump() to dump the compiled version of a
  function.
* Add unsafe Chunk::into_function_allow_binary() which allows
  binary (i.e. precompiled) Lua.
These wrappers prevent loading binary Lua chunks.
Fix a problem with the wrapper: passing `nil` as the optional arguments
turns out to be different to passing fewer arguments.
Also fix an incorrect error return in dostring().
Fix dofile: raise an error instead of returning nil.
We were using the same temp file for two tests, which meant
there were race conditions.  Should really use non-hardcoded
filenames.
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.

1 participant