Thread: Lua 5.1 or 5.2?
View Single Post
Unread 06-06-12, 12:00 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,007
To mention what would be most impacted would be the SecureHandler system as it relies entirely on being able to create independent secure environments.

http://www.lua.org/manual/5.2/manual.html#8

8.1 – Changes in the Language
  • The concept of environment changed. Only Lua functions have environments. To set the environment of a Lua function, use the variable _ENV or the function load.

    C functions no longer have environments. Use an upvalue with a shared table if you need to keep shared state among several C functions. (You may use luaL_setfuncs to open a C library with all functions sharing a common upvalue.)

    To manipulate the "environment" of a userdata (which is now called user value), use the new functions lua_getuservalue and lua_setuservalue.



8.2 – Changes in the Libraries
  • Functions setfenv and getfenv were removed, because of the changes in environments.
__________________
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 06-06-12 at 12:05 PM.
SDPhantom is offline