mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
avoid using 'ttype' when there is an explicit test
This commit is contained in:
parent
599789a907
commit
155dd01163
1 changed files with 3 additions and 4 deletions
7
lvm.h
7
lvm.h
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lvm.h,v 2.10 2009/06/17 16:17:14 roberto Exp roberto $
|
||||
** $Id: lvm.h,v 2.11 2009/06/17 17:51:07 roberto Exp roberto $
|
||||
** Lua virtual machine
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
@ -13,10 +13,9 @@
|
|||
#include "ltm.h"
|
||||
|
||||
|
||||
#define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o)))
|
||||
#define tostring(L,o) (ttisstring(o) || (luaV_tostring(L, o)))
|
||||
|
||||
#define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \
|
||||
(((o) = luaV_tonumber(o,n)) != NULL))
|
||||
#define tonumber(o,n) (ttisnumber(o) || (((o) = luaV_tonumber(o,n)) != NULL))
|
||||
|
||||
#define equalobj(L,o1,o2) \
|
||||
(ttype(o1) == ttype(o2) && luaV_equalval_(L, o1, o2))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue