diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-30 16:09:21 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-30 16:09:21 -0300 |
commit | fdafd4f4a88d1584dea900517445a17d87f8b82f (patch) | |
tree | 52e38e886d569e77c1df82ebe2bcfbaafd4c6f75 /lua.h | |
parent | beeff4ccafe5877d00119cb3d93f1f937d46dcfb (diff) | |
download | lua-fdafd4f4a88d1584dea900517445a17d87f8b82f.tar.gz lua-fdafd4f4a88d1584dea900517445a17d87f8b82f.tar.bz2 lua-fdafd4f4a88d1584dea900517445a17d87f8b82f.zip |
new structure for collectable objects, sharing a common header
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.153 2002/08/06 18:54:18 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.154 2002/08/12 17:23:12 roberto Exp roberto $ |
3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil | 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil |
5 | ** http://www.lua.org mailto:info@lua.org | 5 | ** http://www.lua.org mailto:info@lua.org |
@@ -63,13 +63,13 @@ typedef const char * (*lua_Chunkreader) (lua_State *L, void *ud, size_t *size); | |||
63 | #define LUA_TNONE (-1) | 63 | #define LUA_TNONE (-1) |
64 | 64 | ||
65 | #define LUA_TNIL 0 | 65 | #define LUA_TNIL 0 |
66 | #define LUA_TNUMBER 1 | 66 | #define LUA_TBOOLEAN 1 |
67 | #define LUA_TSTRING 2 | 67 | #define LUA_TLIGHTUSERDATA 2 |
68 | #define LUA_TBOOLEAN 3 | 68 | #define LUA_TNUMBER 3 |
69 | #define LUA_TTABLE 4 | 69 | #define LUA_TSTRING 4 |
70 | #define LUA_TFUNCTION 5 | 70 | #define LUA_TTABLE 5 |
71 | #define LUA_TUSERDATA 6 | 71 | #define LUA_TFUNCTION 6 |
72 | #define LUA_TLIGHTUSERDATA 7 | 72 | #define LUA_TUSERDATA 7 |
73 | 73 | ||
74 | 74 | ||
75 | /* minimum Lua stack available to a C function */ | 75 | /* minimum Lua stack available to a C function */ |
@@ -127,6 +127,7 @@ LUA_API int lua_checkstack (lua_State *L, int size); | |||
127 | LUA_API int lua_isnumber (lua_State *L, int index); | 127 | LUA_API int lua_isnumber (lua_State *L, int index); |
128 | LUA_API int lua_isstring (lua_State *L, int index); | 128 | LUA_API int lua_isstring (lua_State *L, int index); |
129 | LUA_API int lua_iscfunction (lua_State *L, int index); | 129 | LUA_API int lua_iscfunction (lua_State *L, int index); |
130 | LUA_API int lua_isuserdata (lua_State *L, int index); | ||
130 | LUA_API int lua_type (lua_State *L, int index); | 131 | LUA_API int lua_type (lua_State *L, int index); |
131 | LUA_API const char *lua_typename (lua_State *L, int type); | 132 | LUA_API const char *lua_typename (lua_State *L, int type); |
132 | 133 | ||
@@ -240,7 +241,6 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size); | |||
240 | 241 | ||
241 | #define lua_isfunction(L,n) (lua_type(L,n) == LUA_TFUNCTION) | 242 | #define lua_isfunction(L,n) (lua_type(L,n) == LUA_TFUNCTION) |
242 | #define lua_istable(L,n) (lua_type(L,n) == LUA_TTABLE) | 243 | #define lua_istable(L,n) (lua_type(L,n) == LUA_TTABLE) |
243 | #define lua_isuserdata(L,n) (lua_type(L,n) >= LUA_TUSERDATA) | ||
244 | #define lua_islightuserdata(L,n) (lua_type(L,n) == LUA_TLIGHTUSERDATA) | 244 | #define lua_islightuserdata(L,n) (lua_type(L,n) == LUA_TLIGHTUSERDATA) |
245 | #define lua_isnil(L,n) (lua_type(L,n) == LUA_TNIL) | 245 | #define lua_isnil(L,n) (lua_type(L,n) == LUA_TNIL) |
246 | #define lua_isboolean(L,n) (lua_type(L,n) == LUA_TBOOLEAN) | 246 | #define lua_isboolean(L,n) (lua_type(L,n) == LUA_TBOOLEAN) |