diff options
Diffstat (limited to 'src/auxiliar.c')
-rw-r--r-- | src/auxiliar.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/auxiliar.c b/src/auxiliar.c index 2ebcdd6..b228785 100644 --- a/src/auxiliar.c +++ b/src/auxiliar.c | |||
@@ -127,6 +127,9 @@ void aux_setclass(lua_State *L, const char *classname, int objidx) { | |||
127 | * otherwise | 127 | * otherwise |
128 | \*-------------------------------------------------------------------------*/ | 128 | \*-------------------------------------------------------------------------*/ |
129 | void *aux_getgroupudata(lua_State *L, const char *groupname, int objidx) { | 129 | void *aux_getgroupudata(lua_State *L, const char *groupname, int objidx) { |
130 | #if 0 | ||
131 | return lua_touserdata(L, objidx); | ||
132 | #else | ||
130 | if (!lua_getmetatable(L, objidx)) | 133 | if (!lua_getmetatable(L, objidx)) |
131 | return NULL; | 134 | return NULL; |
132 | lua_pushstring(L, groupname); | 135 | lua_pushstring(L, groupname); |
@@ -138,6 +141,7 @@ void *aux_getgroupudata(lua_State *L, const char *groupname, int objidx) { | |||
138 | lua_pop(L, 2); | 141 | lua_pop(L, 2); |
139 | return lua_touserdata(L, objidx); | 142 | return lua_touserdata(L, objidx); |
140 | } | 143 | } |
144 | #endif | ||
141 | } | 145 | } |
142 | 146 | ||
143 | /*-------------------------------------------------------------------------*\ | 147 | /*-------------------------------------------------------------------------*\ |
@@ -145,5 +149,9 @@ void *aux_getgroupudata(lua_State *L, const char *groupname, int objidx) { | |||
145 | * otherwise | 149 | * otherwise |
146 | \*-------------------------------------------------------------------------*/ | 150 | \*-------------------------------------------------------------------------*/ |
147 | void *aux_getclassudata(lua_State *L, const char *classname, int objidx) { | 151 | void *aux_getclassudata(lua_State *L, const char *classname, int objidx) { |
152 | #if 0 | ||
153 | return lua_touserdata(L, objidx); | ||
154 | #else | ||
148 | return luaL_checkudata(L, objidx, classname); | 155 | return luaL_checkudata(L, objidx, classname); |
156 | #endif | ||
149 | } | 157 | } |