This repository was archived by the owner on Dec 29, 2024. It is now read-only.
v2.1-beta3
Pre-release
Pre-release
4.1.x
This is the first large feature update for LuaAPI v2.1
What's Changed
- Added
memory_limitproperty to the LuaAPI class. This allows to set the max allowed memory usage for the Lua state in bytes. - Added
object_metatableproperty to the LuaAPI class. This sets the default metatable for Objects which do not define alua_metatableproperty. - Removed
permissiveproperty from the LuaAPI class. This has been replaced with thepermissiveproperty on LuaDefaultObjectMetatable which occupies the LuaAPIobject_metatableproperty by default. - Added
get_memory_usage()method to the LuaAPI class. This returns the current memory usage of the Lua state in bytes. - Removed
expose_object_constructor()from the LuaAPI class. This is no longer needed, you can push the obj.new method as a global usingLuaAPI.push_global()for the same effect but with constructor argument support. - New LuaObjectMetatable class. This is a interface class meant to be used to define metatables.
- New LuaDefaultObjectMetatable class. This is the type that
object_metatabledefaults to, it provides the same functionality with metatables and metamethods we had before this update. The LuaAPI permissive property has been moved to this class now. It will yield metamethod calls to the object if it defines them like before. Otherwise looks for thelua_fieldsmethod which is either a blacklist or a whitelist depending onpermissive.
There are a lot of changes with this update so I suspect there may be some regression, if you notice any please open an issue.