diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-25 14:45:36 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-25 14:45:36 -0200 |
| commit | a53d9b66ca6247818acaf41e28cdf123082a272b (patch) | |
| tree | 8e909200d4d925fc7394e6adf83cc5941456c588 /lua.h | |
| parent | c8559e3c8d12e052783e2952db1372c68cc16059 (diff) | |
| download | lua-a53d9b66ca6247818acaf41e28cdf123082a272b.tar.gz lua-a53d9b66ca6247818acaf41e28cdf123082a272b.tar.bz2 lua-a53d9b66ca6247818acaf41e28cdf123082a272b.zip | |
first implementation for type names
Diffstat (limited to 'lua.h')
| -rw-r--r-- | lua.h | 10 |
1 files changed, 8 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.82 2001/01/10 16:58:11 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.83 2001/01/22 18:01:38 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: lua@tecgraf.puc-rio.br | 5 | ** e-mail: lua@tecgraf.puc-rio.br |
| @@ -102,6 +102,7 @@ LUA_API int lua_stackspace (lua_State *L); | |||
| 102 | 102 | ||
| 103 | LUA_API int lua_type (lua_State *L, int index); | 103 | LUA_API int lua_type (lua_State *L, int index); |
| 104 | LUA_API const char *lua_typename (lua_State *L, int t); | 104 | LUA_API const char *lua_typename (lua_State *L, int t); |
| 105 | LUA_API const char *lua_xtype (lua_State *L, int index); | ||
| 105 | LUA_API int lua_isnumber (lua_State *L, int index); | 106 | LUA_API int lua_isnumber (lua_State *L, int index); |
| 106 | LUA_API int lua_isstring (lua_State *L, int index); | 107 | LUA_API int lua_isstring (lua_State *L, int index); |
| 107 | LUA_API int lua_iscfunction (lua_State *L, int index); | 108 | LUA_API int lua_iscfunction (lua_State *L, int index); |
| @@ -173,7 +174,8 @@ LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold); | |||
| 173 | /* | 174 | /* |
| 174 | ** miscellaneous functions | 175 | ** miscellaneous functions |
| 175 | */ | 176 | */ |
| 176 | LUA_API int lua_newtag (lua_State *L); | 177 | LUA_API int lua_newtype (lua_State *L, const char *name, int basictype); |
| 178 | LUA_API int lua_type2tag (lua_State *L, const char *name); | ||
| 177 | LUA_API int lua_copytagmethods (lua_State *L, int tagto, int tagfrom); | 179 | LUA_API int lua_copytagmethods (lua_State *L, int tagto, int tagfrom); |
| 178 | LUA_API void lua_settag (lua_State *L, int tag); | 180 | LUA_API void lua_settag (lua_State *L, int tag); |
| 179 | 181 | ||
| @@ -212,6 +214,10 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size); | |||
| 212 | 214 | ||
| 213 | #define lua_pushliteral(L, s) lua_pushlstring(L, "" s, (sizeof(s))-1) | 215 | #define lua_pushliteral(L, s) lua_pushlstring(L, "" s, (sizeof(s))-1) |
| 214 | 216 | ||
| 217 | |||
| 218 | |||
| 219 | #define lua_newtag(L) lua_newtype(L, NULL, LUA_TNONE) | ||
| 220 | |||
| 215 | #endif | 221 | #endif |
| 216 | 222 | ||
| 217 | 223 | ||
