diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-26 13:38:01 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-26 13:38:01 -0200 |
commit | fd25d4ad85302a84551ac6ed915435c035a978e4 (patch) | |
tree | 83b182dd0a067bf4087f859cd82f4eb26324899d /lua.h | |
parent | 2431534f1061149bf7db7985dd137cd6324056a8 (diff) | |
download | lua-fd25d4ad85302a84551ac6ed915435c035a978e4.tar.gz lua-fd25d4ad85302a84551ac6ed915435c035a978e4.tar.bz2 lua-fd25d4ad85302a84551ac6ed915435c035a978e4.zip |
no need to define functions for macros...
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.24 1998/08/21 17:43:44 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.25 1998/12/15 14:59:43 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 |
@@ -100,30 +100,22 @@ long lua_collectgarbage (long limit); | |||
100 | 100 | ||
101 | 101 | ||
102 | /* =============================================================== */ | 102 | /* =============================================================== */ |
103 | /* some useful macros/derived functions */ | 103 | /* some useful macros/functions */ |
104 | 104 | ||
105 | int (lua_call) (char *name); | ||
106 | #define lua_call(name) lua_callfunction(lua_getglobal(name)) | 105 | #define lua_call(name) lua_callfunction(lua_getglobal(name)) |
107 | 106 | ||
108 | void (lua_pushref) (int ref); | ||
109 | #define lua_pushref(ref) lua_pushobject(lua_getref(ref)) | 107 | #define lua_pushref(ref) lua_pushobject(lua_getref(ref)) |
110 | 108 | ||
111 | int (lua_refobject) (lua_Object o, int l); | ||
112 | #define lua_refobject(o,l) (lua_pushobject(o), lua_ref(l)) | 109 | #define lua_refobject(o,l) (lua_pushobject(o), lua_ref(l)) |
113 | 110 | ||
114 | void (lua_register) (char *n, lua_CFunction f); | ||
115 | #define lua_register(n,f) (lua_pushcfunction(f), lua_setglobal(n)) | 111 | #define lua_register(n,f) (lua_pushcfunction(f), lua_setglobal(n)) |
116 | 112 | ||
117 | void (lua_pushuserdata) (void *u); | ||
118 | #define lua_pushuserdata(u) lua_pushusertag(u, 0) | 113 | #define lua_pushuserdata(u) lua_pushusertag(u, 0) |
119 | 114 | ||
120 | void (lua_pushcfunction) (lua_CFunction f); | ||
121 | #define lua_pushcfunction(f) lua_pushcclosure(f, 0) | 115 | #define lua_pushcfunction(f) lua_pushcclosure(f, 0) |
122 | 116 | ||
123 | int (lua_clonetag) (int t); | ||
124 | #define lua_clonetag(t) lua_copytagmethods(lua_newtag(), (t)) | 117 | #define lua_clonetag(t) lua_copytagmethods(lua_newtag(), (t)) |
125 | 118 | ||
126 | |||
127 | lua_Object lua_seterrormethod (void); /* In: new method */ | 119 | lua_Object lua_seterrormethod (void); /* In: new method */ |
128 | 120 | ||
129 | /* ========================================================================== | 121 | /* ========================================================================== |