diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-12-13 13:54:21 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-12-13 13:54:21 -0200 |
| commit | 5dfd17dd769d159a3b0722ddf82b385ff7271d53 (patch) | |
| tree | 5e4329c717d7276191c711a80ea9323bf0560a4c /lua.h | |
| parent | ce4fb88b34421bc4426db7985314ba7ed757a284 (diff) | |
| download | lua-github-5dfd17dd769d159a3b0722ddf82b385ff7271d53.tar.gz | |
new API function 'lua_pushliteral'
Diffstat (limited to 'lua.h')
| -rw-r--r-- | lua.h | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -2,7 +2,7 @@ ** LUA - Linguagem para Usuarios de Aplicacao ** Grupo de Tecnologia em Computacao Grafica ** TeCGraf - PUC-Rio -** $Id: lua.h,v 3.10 1994/11/17 21:27:30 roberto Exp roberto $ +** $Id: lua.h,v 3.11 1994/11/18 19:46:21 roberto Stab roberto $ */ @@ -51,6 +51,7 @@ void *lua_getuserdata (lua_Object object); int lua_pushnil (void); int lua_pushnumber (float n); int lua_pushstring (char *s); +int lua_pushliteral (char *s); int lua_pushcfunction (lua_CFunction fn); int lua_pushusertag (void *u, int tag); int lua_pushobject (lua_Object object); @@ -70,15 +71,12 @@ void lua_unlock (int ref); lua_Object lua_createtable (int initSize); -/* for lua 1.1 */ +/* some useful macros */ #define lua_lockobject(o) (lua_pushobject(o), lua_lock()) #define lua_register(n,f) (lua_pushcfunction(f), lua_storeglobal(n)) -#define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getsubscript()) -#define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_getsubscript()) - #define lua_pushuserdata(u) lua_pushusertag(u, LUA_T_USERDATA) #define lua_isnil(_) (lua_type(_)==LUA_T_NIL) @@ -89,4 +87,10 @@ lua_Object lua_createtable (int initSize); #define lua_iscfunction(_) (lua_type(_)==LUA_T_CFUNCTION) #define lua_isuserdata(_) (lua_type(_)>=LUA_T_USERDATA) + +/* for lua 1.1 compatibility. Avoid using these macros */ + +#define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getsubscript()) +#define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_getsubscript()) + #endif |
