-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Official repository:
https://github.com/luabind/luabind
Forks:
https://github.com/rpavlik/luabind
https://github.com/OpenXRay/luabind-deboostified/
Documentation:
https://github.com/luabind/luabind/wiki/Docs#implementation-notes
The classes and objects are implemented as user data in Lua. To make sure that the user data really is the internal structure it is supposed to be, we tag their metatables. A user data who's metatable contains a boolean member named __luabind_classrep is expected to be a class exported by luabind. A user data who's metatable contains a boolean member named __luabind_class is expected to be an instantiation of a luabind class.
This means that if you make your own user data and tags its metatable with the exact same names, you can very easily fool luabind and crash the application.
In the Lua registry, luabind keeps an entry called __luabind_classes. It should not be removed or overwritten.