summaryrefslogtreecommitdiff
path: root/lauxlib.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-10-18 09:51:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-10-18 09:51:44 -0300
commite5cfa7a3672eecfd81fb290faac9ac60c76e7231 (patch)
tree59dc6d9f10b2361b8156db93e0528bb21097df6e /lauxlib.h
parentaae16127470f266e1852dad7ad99d72e0671addc (diff)
downloadlua-e5cfa7a3672eecfd81fb290faac9ac60c76e7231.tar.gz
lua-e5cfa7a3672eecfd81fb290faac9ac60c76e7231.tar.bz2
lua-e5cfa7a3672eecfd81fb290faac9ac60c76e7231.zip
use of parentheses around macro parameters in call lists, to avoid
problems with comma expressions
Diffstat (limited to 'lauxlib.h')
-rw-r--r--lauxlib.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/lauxlib.h b/lauxlib.h
index e8ee1438..74db18d6 100644
--- a/lauxlib.h
+++ b/lauxlib.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.h,v 1.71 2004/09/21 16:54:32 roberto Exp roberto $ 2** $Id: lauxlib.h,v 1.72 2004/09/29 21:00:25 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -84,15 +84,15 @@ LUALIB_API const char *luaL_setfield (lua_State *L, int idx, const char *fname);
84*/ 84*/
85 85
86#define luaL_argcheck(L, cond,numarg,extramsg) \ 86#define luaL_argcheck(L, cond,numarg,extramsg) \
87 ((void)((cond) || luaL_argerror(L, numarg,extramsg))) 87 ((void)((cond) || luaL_argerror(L, (numarg), (extramsg))))
88#define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) 88#define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL))
89#define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) 89#define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL))
90#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, n)) 90#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n)))
91#define luaL_optint(L,n,d) ((int)luaL_optinteger(L, n,d)) 91#define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d)))
92#define luaL_checklong(L,n) ((long)luaL_checkinteger(L, n)) 92#define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n)))
93#define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, n,d)) 93#define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d)))
94 94
95#define luaL_typename(L,i) lua_typename(L,lua_type(L,(i))) 95#define luaL_typename(L,i) lua_typename(L, lua_type(L,(i)))
96 96
97/* 97/*
98** {====================================================== 98** {======================================================
@@ -137,7 +137,7 @@ LUALIB_API void luaL_pushresult (luaL_Buffer *B);
137 137
138#define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref)) 138#define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref))
139 139
140#define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, ref) 140#define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, (ref))
141 141
142 142
143#endif 143#endif