From 4abe99dc341b2ec0cb59b8fa95006e9781938eed Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 26 Apr 2013 13:03:50 -0300 Subject: new interface for 'tonumber' --- ldebug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 96d47085..478c642e 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.91 2013/04/25 15:59:42 roberto Exp roberto $ +** $Id: ldebug.c,v 2.92 2013/04/26 13:07:53 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -525,8 +525,8 @@ l_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2) { l_noret luaG_aritherror (lua_State *L, const TValue *p1, const TValue *p2) { - TValue temp; - if (luaV_tonumber(p1, &temp) == NULL) + lua_Number temp; + if (!tonumber(p1, &temp)) p2 = p1; /* first operand is wrong */ luaG_typeerror(L, p2, "perform arithmetic on"); } -- cgit v1.2.3-55-g6feb