lua_Type is private (preparation for tags)
This commit is contained in:
35
lua.h
35
lua.h
@@ -2,7 +2,7 @@
|
||||
** LUA - Linguagem para Usuarios de Aplicacao
|
||||
** Grupo de Tecnologia em Computacao Grafica
|
||||
** TeCGraf - PUC-Rio
|
||||
** $Id: lua.h,v 3.32 1996/11/20 13:49:32 roberto Exp roberto $
|
||||
** $Id: lua.h,v 3.33 1997/02/11 11:40:01 roberto Exp roberto $
|
||||
*/
|
||||
|
||||
|
||||
@@ -14,25 +14,6 @@
|
||||
#define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo"
|
||||
|
||||
|
||||
/* Private Part */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
LUA_T_NIL = -1,
|
||||
LUA_T_NUMBER = -2,
|
||||
LUA_T_STRING = -3,
|
||||
LUA_T_ARRAY = -4,
|
||||
LUA_T_FUNCTION = -5,
|
||||
LUA_T_CFUNCTION= -6,
|
||||
LUA_T_MARK = -7,
|
||||
LUA_T_CMARK = -8,
|
||||
LUA_T_LINE = -9,
|
||||
LUA_T_USERDATA = 0
|
||||
} lua_Type;
|
||||
|
||||
|
||||
/* Public Part */
|
||||
|
||||
#define LUA_NOOBJECT 0
|
||||
|
||||
typedef void (*lua_CFunction) (void);
|
||||
@@ -52,10 +33,10 @@ void lua_endblock (void);
|
||||
lua_Object lua_getparam (int number);
|
||||
#define lua_getresult(_) lua_getparam(_)
|
||||
|
||||
#define lua_isnil(_) (lua_type(_)==LUA_T_NIL)
|
||||
#define lua_istable(_) (lua_type(_)==LUA_T_ARRAY)
|
||||
#define lua_isuserdata(_) (lua_type(_)>=LUA_T_USERDATA)
|
||||
#define lua_iscfunction(_) (lua_type(_)==LUA_T_CFUNCTION)
|
||||
int lua_isnil (lua_Object object);
|
||||
int lua_istable (lua_Object object);
|
||||
int lua_isuserdata (lua_Object object);
|
||||
int lua_iscfunction (lua_Object object);
|
||||
int lua_isnumber (lua_Object object);
|
||||
int lua_isstring (lua_Object object);
|
||||
int lua_isfunction (lua_Object object);
|
||||
@@ -65,7 +46,6 @@ char *lua_getstring (lua_Object object);
|
||||
lua_CFunction lua_getcfunction (lua_Object object);
|
||||
void *lua_getbinarydata (lua_Object object);
|
||||
int lua_getbindatasize (lua_Object object);
|
||||
void *lua_getuserdata (lua_Object object);
|
||||
|
||||
void lua_pushnil (void);
|
||||
void lua_pushnumber (float n);
|
||||
@@ -98,11 +78,14 @@ lua_Object lua_createtable (void);
|
||||
|
||||
#define lua_register(n,f) (lua_pushcfunction(f), lua_storeglobal(n))
|
||||
|
||||
#define lua_pushuserdata(u) lua_pushusertag(u, LUA_T_USERDATA)
|
||||
#define lua_pushuserdata(u) lua_pushusertag(u, 0)
|
||||
|
||||
|
||||
|
||||
/* for compatibility with old versions. Avoid using these macros */
|
||||
|
||||
#define lua_getuserdata(o) (*(void **)lua_getbinarydata(o))
|
||||
|
||||
#define lua_lockobject(o) lua_refobject(o,1)
|
||||
#define lua_lock() lua_ref(1)
|
||||
#define lua_getlocked lua_getref
|
||||
|
||||
Reference in New Issue
Block a user