diff options
author | pixel <pixel> | 2007-06-19 21:31:19 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-06-19 21:31:19 +0000 |
commit | 2ea3dc07618405c5bfdc8b7a550acb3a3e81d6b2 (patch) | |
tree | 42d2740b141537a560053b1c8e1d27440a689e32 | |
parent | bb2a29b3cbe7cdd29010a652b1aaf55ade2c1f28 (diff) |
Allowing the USERDATA type in LuaObjects
-rw-r--r-- | include/BLua.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/BLua.h b/include/BLua.h index 9958cba..4fec1b6 100644 --- a/include/BLua.h +++ b/include/BLua.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: BLua.h,v 1.39 2007-06-17 15:13:46 pixel Exp $ */ +/* $Id: BLua.h,v 1.40 2007-06-19 21:31:19 pixel Exp $ */ #ifndef __BLUA_H__ #define __BLUA_H__ @@ -185,10 +185,11 @@ enum Lua_types_t { LUA_STRING = 0x10, LUA_FUNCTION = 0x20, LUA_NIL = 0x40, - LUA_ANY = 0x7f, + LUA_USERDATA = 0x80, + LUA_ANY = 0xff, }; -#define MAX_TYPE 7 +#define MAX_TYPE 8 #define MAXARGS 32 @@ -309,6 +310,9 @@ class LuaHelpers : public Base { case LUA_NIL: arg_valid = L->isnil(i + 1 + add); break; + case LUA_USERDATA: + arg_valid = L->isuserdata(i + 1 + add) || L->islightuserdata(i + 1 + add); + break; } } } |