removing unnecessary bits
This commit is contained in:
parent
fe758f3e05
commit
49a8e28eb9
1 changed files with 1 additions and 7 deletions
|
|
@ -1039,15 +1039,9 @@ SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L)
|
|||
{
|
||||
/* there should be 1 param passed in
|
||||
(1) userdata (not the metatable) */
|
||||
const char *className;
|
||||
swig_lua_userdata* userData;
|
||||
assert(lua_isuserdata(L,1)); /* just in case */
|
||||
userData = (swig_lua_userdata*)lua_touserdata(L,1); /* get the userdata address for later */
|
||||
lua_getmetatable(L,1); /* get the meta table */
|
||||
assert(lua_istable(L,-1)); /* just in case */
|
||||
|
||||
lua_getfield(L, -1, ".type");
|
||||
className = lua_tostring(L, -1);
|
||||
userData = (swig_lua_userdata*)lua_touserdata(L,1); /* get the userdata address */
|
||||
|
||||
lua_pushfstring(L, "<userdata of type '%s' at %p>", userData->type->str, userData->ptr);
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue