summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShane Liesegang <shane@techie.net>2019-08-02 23:10:19 +0200
committerShane Liesegang <shane@techie.net>2019-08-02 23:10:19 +0200
commit49a8e28eb909c21a8b17cdfe2d9a19e7e0f8a82f (patch)
tree05d23fa01a6559dc54a72dab3575c1eeedec85fb
parentfe758f3e0577cedb12e5edd0f6219cb5f30134c2 (diff)
downloadswig-49a8e28eb909c21a8b17cdfe2d9a19e7e0f8a82f.tar.gz
removing unnecessary bits
-rw-r--r--Lib/lua/luarun.swg8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/lua/luarun.swg b/Lib/lua/luarun.swg
index 9ce99f01e..bd764d668 100644
--- a/Lib/lua/luarun.swg
+++ b/Lib/lua/luarun.swg
@@ -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;