equal
deleted
inserted
replaced
55 void* lua_type_get (lua_State *L, const struct lua_type *type, int index) |
55 void* lua_type_get (lua_State *L, const struct lua_type *type, int index) |
56 { |
56 { |
57 void *ud; |
57 void *ud; |
58 |
58 |
59 // validate the userdata arg |
59 // validate the userdata arg |
|
60 // XXX: the luaL_checkudata actually raises an error itself |
60 if ((ud = luaL_checkudata(L, index, type->name)) == NULL) { |
61 if ((ud = luaL_checkudata(L, index, type->name)) == NULL) { |
61 luaL_error(L, "bad type argument: `%s` expected", type->name); return NULL; |
62 luaL_error(L, "bad type argument: `%s` expected", type->name); return NULL; |
62 |
63 |
63 } else { |
64 } else { |
64 // ok |
65 // ok |