diff options
author | Shane Liesegang <shane@techie.net> | 2019-08-02 23:10:19 +0200 |
---|---|---|
committer | Shane Liesegang <shane@techie.net> | 2019-08-02 23:10:19 +0200 |
commit | 49a8e28eb909c21a8b17cdfe2d9a19e7e0f8a82f (patch) | |
tree | 05d23fa01a6559dc54a72dab3575c1eeedec85fb | |
parent | fe758f3e0577cedb12e5edd0f6219cb5f30134c2 (diff) | |
download | swig-49a8e28eb909c21a8b17cdfe2d9a19e7e0f8a82f.tar.gz |
removing unnecessary bits
-rw-r--r-- | Lib/lua/luarun.swg | 8 |
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; |