diff options
Diffstat (limited to '')
| -rw-r--r-- | lua.h | 15 |
1 files changed, 10 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.339 2017/11/07 13:25:26 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.340 2018/02/17 19:29:29 roberto Exp roberto $ |
| 3 | ** Lua - A Scripting Language | 3 | ** Lua - A Scripting Language |
| 4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) | 4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) |
| 5 | ** See Copyright Notice at the end of this file | 5 | ** See Copyright Notice at the end of this file |
| @@ -247,9 +247,9 @@ LUA_API int (lua_rawgeti) (lua_State *L, int idx, lua_Integer n); | |||
| 247 | LUA_API int (lua_rawgetp) (lua_State *L, int idx, const void *p); | 247 | LUA_API int (lua_rawgetp) (lua_State *L, int idx, const void *p); |
| 248 | 248 | ||
| 249 | LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec); | 249 | LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec); |
| 250 | LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz); | 250 | LUA_API void *(lua_newuserdatauv) (lua_State *L, size_t sz, int nuvalue); |
| 251 | LUA_API int (lua_getmetatable) (lua_State *L, int objindex); | 251 | LUA_API int (lua_getmetatable) (lua_State *L, int objindex); |
| 252 | LUA_API int (lua_getuservalue) (lua_State *L, int idx); | 252 | LUA_API int (lua_getiuservalue) (lua_State *L, int idx, int n); |
| 253 | 253 | ||
| 254 | 254 | ||
| 255 | /* | 255 | /* |
| @@ -263,7 +263,7 @@ LUA_API void (lua_rawset) (lua_State *L, int idx); | |||
| 263 | LUA_API void (lua_rawseti) (lua_State *L, int idx, lua_Integer n); | 263 | LUA_API void (lua_rawseti) (lua_State *L, int idx, lua_Integer n); |
| 264 | LUA_API void (lua_rawsetp) (lua_State *L, int idx, const void *p); | 264 | LUA_API void (lua_rawsetp) (lua_State *L, int idx, const void *p); |
| 265 | LUA_API int (lua_setmetatable) (lua_State *L, int objindex); | 265 | LUA_API int (lua_setmetatable) (lua_State *L, int objindex); |
| 266 | LUA_API void (lua_setuservalue) (lua_State *L, int idx); | 266 | LUA_API int (lua_setiuservalue) (lua_State *L, int idx, int n); |
| 267 | 267 | ||
| 268 | 268 | ||
| 269 | /* | 269 | /* |
| @@ -380,7 +380,7 @@ LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); | |||
| 380 | 380 | ||
| 381 | /* | 381 | /* |
| 382 | ** {============================================================== | 382 | ** {============================================================== |
| 383 | ** compatibility macros for unsigned conversions | 383 | ** compatibility macros |
| 384 | ** =============================================================== | 384 | ** =============================================================== |
| 385 | */ | 385 | */ |
| 386 | #if defined(LUA_COMPAT_APIINTCASTS) | 386 | #if defined(LUA_COMPAT_APIINTCASTS) |
| @@ -390,6 +390,11 @@ LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); | |||
| 390 | #define lua_tounsigned(L,i) lua_tounsignedx(L,(i),NULL) | 390 | #define lua_tounsigned(L,i) lua_tounsignedx(L,(i),NULL) |
| 391 | 391 | ||
| 392 | #endif | 392 | #endif |
| 393 | |||
| 394 | #define lua_newuserdata(L,s) lua_newuserdatauv(L,s,1) | ||
| 395 | #define lua_getuservalue(L,idx) lua_getiuservalue(L,idx,1) | ||
| 396 | #define lua_setuservalue(L,idx) lua_setiuservalue(L,idx,1) | ||
| 397 | |||
| 393 | /* }============================================================== */ | 398 | /* }============================================================== */ |
| 394 | 399 | ||
| 395 | /* | 400 | /* |
