From 6b0c38c2e7da04c6bb1eb670cf45cf430881c9f9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 4 Mar 2002 18:33:09 -0300 Subject: `inline' of tonumber --- lvm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lvm.h') diff --git a/lvm.h b/lvm.h index a58e8315..82d7d0a7 100644 --- a/lvm.h +++ b/lvm.h @@ -1,5 +1,5 @@ /* -** $Id: lvm.h,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $ +** $Id: lvm.h,v 1.36 2002/02/07 17:24:05 roberto Exp roberto $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -15,7 +15,8 @@ #define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o))) -#define tonumber(o,n) (((o) = luaV_tonumber(o,n)) != NULL) +#define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \ + (((o) = luaV_tonumber(o,n)) != NULL)) const TObject *luaV_tonumber (const TObject *obj, TObject *n); -- cgit v1.2.3-55-g6feb