1Implementation notes 2==================== 3 4The classes and objects are implemented as user data in Lua. To make sure that 5the user data really is the internal structure it is supposed to be, we tag 6their metatables. Previously a boolean at a string key was used, making it 7relatively easy for the malevolent user to fool Luabind and crash the 8application. However, this has been replaced with a light userdata key that 9should be quite impossible to imitate. 10 11In the Lua registry, luabind kept an entry called ``"__luabind_classes"``. 12This string key is now also replaced with a light userdata one. 13 14In the global table, a variable called ``super`` is used every time a 15constructor in a lua-class is called. This is to make it easy for that 16constructor to call its base class' constructor. So, if you have a global 17variable named super it may be overwritten. This is probably not the best 18solution, and this restriction may be removed in the future. 19 20.. note:: Deprecated 21 22 ``super()`` has been deprecated since version 0.8 in favor of directly 23 invoking the base class' ``__init()`` function:: 24 25 function Derived:__init() 26 Base.__init(self) 27 end 28 29 30The detail namespace and undocumented features 31---------------------------------------------- 32 33Inside the luabind namespace, there’s another namespace called ``detail``. 34Everything cotained therein should not be used by user code and is subject to 35change or vanish even between patch versions. There also exist no explicit 36tests or documentation for this namespace’s contents. 37 38Classes and functions which reside directly in the ``luabind`` namespace but 39are not documented should also rather not be used. However, if you have to 40depend on undocumented features, these are still better than the ``detail`` 41ones. 42