removing unnecessary bits

This commit is contained in:
Shane Liesegang 2019-08-02 23:10:19 +02:00
commit 49a8e28eb9

View file

@ -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;