aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/lbaselib.c b/lbaselib.c
index f087c977..f9b565e3 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.160 2004/11/18 19:53:49 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.161 2004/12/06 17:53:42 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -396,18 +396,8 @@ static int luaB_tostring (lua_State *L) {
396 case LUA_TNIL: 396 case LUA_TNIL:
397 lua_pushliteral(L, "nil"); 397 lua_pushliteral(L, "nil");
398 break; 398 break;
399 case LUA_TTABLE: 399 default:
400 lua_pushfstring(L, "table: %p", lua_topointer(L, 1)); 400 lua_pushfstring(L, "%s: %p", luaL_typename(L, 1), lua_topointer(L, 1));
401 break;
402 case LUA_TFUNCTION:
403 lua_pushfstring(L, "function: %p", lua_topointer(L, 1));
404 break;
405 case LUA_TUSERDATA:
406 case LUA_TLIGHTUSERDATA:
407 lua_pushfstring(L, "userdata: %p", lua_topointer(L, 1));
408 break;
409 case LUA_TTHREAD:
410 lua_pushfstring(L, "thread: %p", lua_topointer(L, 1));
411 break; 401 break;
412 } 402 }
413 return 1; 403 return 1;