OOLua  2.0.1
C++ and Lua binding
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OOLUA::light_return< T > Struct Template Reference

Return trait for a light userdata type. More...

#include <oolua_traits.h>

Detailed Description

template<typename T>
struct OOLUA::light_return< T >

Return trait for a light userdata type.

The type returned from the function is either a void pointer or a pointer to another type. When the function returns, it will push a LUA_TLIGHTUSERDATA to the stack even when the pointer is NULL; therefore a NULL pointer using this traits is never converted to a Lua nil value. A light userdata is also never owned by Lua and OOLua does not store any type information for the it; light_return is a black box which when used incorrectly will invoke undefined behaviour.
This is only valid for function return types.


The documentation for this struct was generated from the following file: