Hello!

Related problem.

If C++ function return null plain pointer and this function is called
from Lua, the resulting Lua object crashes the whole program when any
its method is called.

These two problems (with adopting and direct returning null pointers)
can be solved by library user without changing luabind code by using
smart pointer in luabind class_. This smart pointer wraps plain
pointer, but throws from operator*(), operator->() and operator T*()
if plain pointer == 0.

Nevertheless this check should be incorporated into luabind code.
Maybe null pointers should correspond to Lua "nil".


Best regards,
Boris Nagaev


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to