dan200, on 09 April 2015 - 12:29 PM, said:
Posted a new version to the OP.
It fixes some bugs, and adds a Lua 5.2 compatibility layer in anticipation of a possible version upgrade in the future.
Woo! I can't wait!
Would it be possible to recreate setfenv and getfenv on the Java side of CC?
Edit:
dan200, on 09 April 2015 - 12:57 PM, said:
You know about the environment parameter Lua 5.2 adds to load() right? There were no uses of setfenv in CC that weren't trivially replaceable with that. Do you regually change the environment of a function long after it's been created?
I was not aware of this. I'll look into it
Edit 2:
The
load function seems to only accept strings of code or a function that returns a code string. Does this mean that the only way to run a function in an environment with it is by running something like:
load(string.dump(func), nil, "b", env)
Edited by apemanzilla, 09 April 2015 - 01:02 PM.