diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-01 08:54:56 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-01 08:54:56 -0300 |
commit | 798660c9cddef8a73f68058576e3d47eed2b1a27 (patch) | |
tree | a0aef60fd2f6910ea7ecf6be127f9035e9ce3e07 /lauxlib.h | |
parent | 34b6664dcb28b18ca3f08ed5e36da094b007eb7b (diff) | |
download | lua-798660c9cddef8a73f68058576e3d47eed2b1a27.tar.gz lua-798660c9cddef8a73f68058576e3d47eed2b1a27.tar.bz2 lua-798660c9cddef8a73f68058576e3d47eed2b1a27.zip |
deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)
Diffstat (limited to 'lauxlib.h')
-rw-r--r-- | lauxlib.h | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.h,v 1.124 2014/04/15 18:25:49 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.125 2014/06/26 17:25:11 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 | */ |
@@ -115,10 +115,6 @@ LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname, | |||
115 | ((void)((cond) || luaL_argerror(L, (arg), (extramsg)))) | 115 | ((void)((cond) || luaL_argerror(L, (arg), (extramsg)))) |
116 | #define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) | 116 | #define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) |
117 | #define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) | 117 | #define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) |
118 | #define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) | ||
119 | #define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) | ||
120 | #define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) | ||
121 | #define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d))) | ||
122 | 118 | ||
123 | #define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) | 119 | #define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) |
124 | 120 | ||
@@ -210,15 +206,21 @@ LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname, | |||
210 | 206 | ||
211 | /* | 207 | /* |
212 | ** {============================================================ | 208 | ** {============================================================ |
213 | ** Compatibility with deprecated unsigned conversions | 209 | ** Compatibility with deprecated conversions |
214 | ** ============================================================= | 210 | ** ============================================================= |
215 | */ | 211 | */ |
216 | #if defined(LUA_COMPAT_APIUNSIGNED) | 212 | #if defined(LUA_COMPAT_APIINTCASTS) |
217 | 213 | ||
218 | #define luaL_checkunsigned(L,a) ((lua_Unsigned)luaL_checkinteger(L,a)) | 214 | #define luaL_checkunsigned(L,a) ((lua_Unsigned)luaL_checkinteger(L,a)) |
219 | #define luaL_optunsigned(L,a,d) \ | 215 | #define luaL_optunsigned(L,a,d) \ |
220 | ((lua_Unsigned)luaL_optinteger(L,a,(lua_Integer)(d))) | 216 | ((lua_Unsigned)luaL_optinteger(L,a,(lua_Integer)(d))) |
221 | 217 | ||
218 | #define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) | ||
219 | #define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) | ||
220 | |||
221 | #define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) | ||
222 | #define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d))) | ||
223 | |||
222 | #endif | 224 | #endif |
223 | /* }============================================================ */ | 225 | /* }============================================================ */ |
224 | 226 | ||