|
@@ -1,5 +1,5 @@
|
|
/*
|
|
/*
|
|
-** $Id: ldebug.c,v 2.117 2015/11/02 18:48:07 roberto Exp roberto $
|
|
|
|
|
|
+** $Id: ldebug.c,v 2.118 2015/12/16 16:40:07 roberto Exp roberto $
|
|
** Debug Interface
|
|
** Debug Interface
|
|
** See Copyright Notice in lua.h
|
|
** See Copyright Notice in lua.h
|
|
*/
|
|
*/
|
|
@@ -564,7 +564,7 @@ static const char *varinfo (lua_State *L, const TValue *o) {
|
|
|
|
|
|
|
|
|
|
l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) {
|
|
l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) {
|
|
- const char *t = objtypename(o);
|
|
|
|
|
|
+ const char *t = luaT_objtypename(L, o);
|
|
luaG_runerror(L, "attempt to %s a %s value%s", op, t, varinfo(L, o));
|
|
luaG_runerror(L, "attempt to %s a %s value%s", op, t, varinfo(L, o));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -596,9 +596,9 @@ l_noret luaG_tointerror (lua_State *L, const TValue *p1, const TValue *p2) {
|
|
|
|
|
|
|
|
|
|
l_noret luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2) {
|
|
l_noret luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2) {
|
|
- const char *t1 = objtypename(p1);
|
|
|
|
- const char *t2 = objtypename(p2);
|
|
|
|
- if (t1 == t2)
|
|
|
|
|
|
+ const char *t1 = luaT_objtypename(L, p1);
|
|
|
|
+ const char *t2 = luaT_objtypename(L, p2);
|
|
|
|
+ if (strcmp(t1, t2) == 0)
|
|
luaG_runerror(L, "attempt to compare two %s values", t1);
|
|
luaG_runerror(L, "attempt to compare two %s values", t1);
|
|
else
|
|
else
|
|
luaG_runerror(L, "attempt to compare %s with %s", t1, t2);
|
|
luaG_runerror(L, "attempt to compare %s with %s", t1, t2);
|