diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-04-23 13:35:45 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-04-23 13:35:45 -0300 |
| commit | 572a69b6afbd368beab8844bc876b0f9690b5253 (patch) | |
| tree | f2785c52e1ee9bab5b68823b9481af2510a90829 /lua.h | |
| parent | beee01b170c5fea9ed4527b28b9221d2df1baaba (diff) | |
| download | lua-572a69b6afbd368beab8844bc876b0f9690b5253.tar.gz lua-572a69b6afbd368beab8844bc876b0f9690b5253.tar.bz2 lua-572a69b6afbd368beab8844bc876b0f9690b5253.zip | |
name changes
Diffstat (limited to 'lua.h')
| -rw-r--r-- | lua.h | 23 |
1 files changed, 16 insertions, 7 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.95 2001/04/11 18:39:37 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.96 2001/04/17 17:35:54 roberto Exp roberto $ |
| 3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
| 4 | ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil | 4 | ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil |
| 5 | ** e-mail: info@lua.org | 5 | ** e-mail: info@lua.org |
| @@ -124,8 +124,8 @@ LUA_API int lua_stackspace (lua_State *L); | |||
| 124 | */ | 124 | */ |
| 125 | 125 | ||
| 126 | LUA_API int lua_type (lua_State *L, int index); | 126 | LUA_API int lua_type (lua_State *L, int index); |
| 127 | LUA_API const lua_char *lua_typename (lua_State *L, int t); | 127 | LUA_API const lua_char *lua_tag2name (lua_State *L, int tag); |
| 128 | LUA_API const lua_char *lua_xtype (lua_State *L, int index); | 128 | LUA_API const lua_char *lua_xtypename (lua_State *L, int index); |
| 129 | LUA_API int lua_isnumber (lua_State *L, int index); | 129 | LUA_API int lua_isnumber (lua_State *L, int index); |
| 130 | LUA_API int lua_isstring (lua_State *L, int index); | 130 | LUA_API int lua_isstring (lua_State *L, int index); |
| 131 | LUA_API int lua_iscfunction (lua_State *L, int index); | 131 | LUA_API int lua_iscfunction (lua_State *L, int index); |
| @@ -203,8 +203,8 @@ LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold); | |||
| 203 | /* | 203 | /* |
| 204 | ** miscellaneous functions | 204 | ** miscellaneous functions |
| 205 | */ | 205 | */ |
| 206 | LUA_API int lua_newtype (lua_State *L, const lua_char *name, int basictype); | 206 | LUA_API int lua_newxtype (lua_State *L, const lua_char *name, int basictype); |
| 207 | LUA_API int lua_type2tag (lua_State *L, const lua_char *name); | 207 | LUA_API int lua_name2tag (lua_State *L, const lua_char *name); |
| 208 | LUA_API int lua_copytagmethods (lua_State *L, int tagto, int tagfrom); | 208 | LUA_API int lua_copytagmethods (lua_State *L, int tagto, int tagfrom); |
| 209 | LUA_API void lua_settag (lua_State *L, int tag); | 209 | LUA_API void lua_settag (lua_State *L, int tag); |
| 210 | 210 | ||
| @@ -223,6 +223,12 @@ LUA_API void lua_setweakmode (lua_State *L, int mode); | |||
| 223 | LUA_API int lua_getweakmode (lua_State *L, int index); | 223 | LUA_API int lua_getweakmode (lua_State *L, int index); |
| 224 | 224 | ||
| 225 | 225 | ||
| 226 | /* | ||
| 227 | ** deprecated function | ||
| 228 | */ | ||
| 229 | LUA_API void lua_pushusertag (lua_State *L, void *u, int tag); | ||
| 230 | |||
| 231 | |||
| 226 | /* | 232 | /* |
| 227 | ** =============================================================== | 233 | ** =============================================================== |
| 228 | ** some useful macros | 234 | ** some useful macros |
| @@ -234,7 +240,6 @@ LUA_API int lua_getweakmode (lua_State *L, int index); | |||
| 234 | #define lua_pop(L,n) lua_settop(L, -(n)-1) | 240 | #define lua_pop(L,n) lua_settop(L, -(n)-1) |
| 235 | 241 | ||
| 236 | #define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n)) | 242 | #define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n)) |
| 237 | #define lua_pushusertag(L,u,t) (lua_pushuserdata(L, u), lua_settag(L, t)) | ||
| 238 | #define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0) | 243 | #define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0) |
| 239 | #define lua_clonetag(L,t) lua_copytagmethods(L, lua_newtag(L), (t)) | 244 | #define lua_clonetag(L,t) lua_copytagmethods(L, lua_newtag(L), (t)) |
| 240 | 245 | ||
| @@ -249,7 +254,11 @@ LUA_API int lua_getweakmode (lua_State *L, int index); | |||
| 249 | 254 | ||
| 250 | 255 | ||
| 251 | 256 | ||
| 252 | #define lua_newtag(L) lua_newtype(L, NULL, LUA_TNONE) | 257 | /* |
| 258 | ** compatibility macros | ||
| 259 | */ | ||
| 260 | #define lua_newtag(L) lua_newxtype(L, NULL, LUA_TNONE) | ||
| 261 | #define lua_typename lua_tag2name | ||
| 253 | 262 | ||
| 254 | #endif | 263 | #endif |
| 255 | 264 | ||
