diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-09 16:10:11 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-09 16:10:11 -0200 |
commit | d0780fa16d0365cfacf1c9a4ff58126a92c12e40 (patch) | |
tree | df3c1d73650b93586db7c791658625e521d50300 /lua.h | |
parent | fc0de64c2c3b79c68decc786c1de974fa2a6686e (diff) | |
download | lua-d0780fa16d0365cfacf1c9a4ff58126a92c12e40.tar.gz lua-d0780fa16d0365cfacf1c9a4ff58126a92c12e40.tar.bz2 lua-d0780fa16d0365cfacf1c9a4ff58126a92c12e40.zip |
lua_call cannot be a macro, because it would push the function
over the parameters
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -2,7 +2,7 @@ | |||
2 | ** LUA - Linguagem para Usuarios de Aplicacao | 2 | ** LUA - Linguagem para Usuarios de Aplicacao |
3 | ** Grupo de Tecnologia em Computacao Grafica | 3 | ** Grupo de Tecnologia em Computacao Grafica |
4 | ** TeCGraf - PUC-Rio | 4 | ** TeCGraf - PUC-Rio |
5 | ** $Id: lua.h,v 3.4 1994/11/07 18:27:39 roberto Exp roberto $ | 5 | ** $Id: lua.h,v 3.5 1994/11/08 19:56:39 roberto Exp roberto $ |
6 | */ | 6 | */ |
7 | 7 | ||
8 | 8 | ||
@@ -35,6 +35,7 @@ void lua_error (char *s); | |||
35 | int lua_dofile (char *filename); | 35 | int lua_dofile (char *filename); |
36 | int lua_dostring (char *string); | 36 | int lua_dostring (char *string); |
37 | int lua_callfunction (lua_Object function); | 37 | int lua_callfunction (lua_Object function); |
38 | int lua_call (char *funcname); | ||
38 | 39 | ||
39 | lua_Object lua_getparam (int number); | 40 | lua_Object lua_getparam (int number); |
40 | #define lua_getresult lua_getparam | 41 | #define lua_getresult lua_getparam |
@@ -69,8 +70,6 @@ void lua_unlock (int ref); | |||
69 | 70 | ||
70 | #define lua_register(n,f) (lua_pushcfunction(f), lua_storeglobal(n)) | 71 | #define lua_register(n,f) (lua_pushcfunction(f), lua_storeglobal(n)) |
71 | 72 | ||
72 | #define lua_call(f) lua_callfunction(lua_getglobal(f)) | ||
73 | |||
74 | #define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getsubscript()) | 73 | #define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getsubscript()) |
75 | #define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_getsubscript()) | 74 | #define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_getsubscript()) |
76 | 75 | ||