diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-04 18:33:09 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-04 18:33:09 -0300 |
commit | 6b0c38c2e7da04c6bb1eb670cf45cf430881c9f9 (patch) | |
tree | 2123732e7dc44945b7e8923da7b2ce4be8a5673b /lvm.h | |
parent | 1a3f175640251437e60ca9a29131e289be624a5b (diff) | |
download | lua-6b0c38c2e7da04c6bb1eb670cf45cf430881c9f9.tar.gz lua-6b0c38c2e7da04c6bb1eb670cf45cf430881c9f9.tar.bz2 lua-6b0c38c2e7da04c6bb1eb670cf45cf430881c9f9.zip |
`inline' of tonumber
Diffstat (limited to 'lvm.h')
-rw-r--r-- | lvm.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.h,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $ | 2 | ** $Id: lvm.h,v 1.36 2002/02/07 17:24:05 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -15,7 +15,8 @@ | |||
15 | 15 | ||
16 | #define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o))) | 16 | #define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o))) |
17 | 17 | ||
18 | #define tonumber(o,n) (((o) = luaV_tonumber(o,n)) != NULL) | 18 | #define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \ |
19 | (((o) = luaV_tonumber(o,n)) != NULL)) | ||
19 | 20 | ||
20 | 21 | ||
21 | const TObject *luaV_tonumber (const TObject *obj, TObject *n); | 22 | const TObject *luaV_tonumber (const TObject *obj, TObject *n); |