diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-02-26 14:38:41 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-02-26 14:38:41 -0300 |
| commit | 131d66efd2dc26b05bcb2bdaf67f5175f3eda1aa (patch) | |
| tree | e912e35e04883c24e89917ee3d94b8fa574f6294 /lua.h | |
| parent | bbf1b3060a1aa4e5ec3235a560d3d054457e957d (diff) | |
| download | lua-131d66efd2dc26b05bcb2bdaf67f5175f3eda1aa.tar.gz lua-131d66efd2dc26b05bcb2bdaf67f5175f3eda1aa.tar.bz2 lua-131d66efd2dc26b05bcb2bdaf67f5175f3eda1aa.zip | |
first step in implementing internal methods.
Diffstat (limited to 'lua.h')
| -rw-r--r-- | lua.h | 30 |
1 files changed, 20 insertions, 10 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.33 1997/02/11 11:40:01 roberto Exp roberto $ | 5 | ** $Id: lua.h,v 3.34 1997/02/20 15:51:14 roberto Exp roberto $ |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | 8 | ||
| @@ -19,13 +19,19 @@ | |||
| 19 | typedef void (*lua_CFunction) (void); | 19 | typedef void (*lua_CFunction) (void); |
| 20 | typedef unsigned int lua_Object; | 20 | typedef unsigned int lua_Object; |
| 21 | 21 | ||
| 22 | lua_Object lua_setfallback (char *name, lua_CFunction fallback); | 22 | lua_Object lua_setfallback (char *event, lua_CFunction fallback); |
| 23 | void lua_setintmethod (int tag, char *event, lua_CFunction method); | ||
| 24 | |||
| 25 | int lua_newtag (char *t); | ||
| 26 | void lua_settag (int tag); /* In: object */ | ||
| 23 | 27 | ||
| 24 | void lua_error (char *s); | 28 | void lua_error (char *s); |
| 25 | int lua_dofile (char *filename); | 29 | int lua_dofile (char *filename); /* Out: returns */ |
| 26 | int lua_dostring (char *string); | 30 | int lua_dostring (char *string); /* Out: returns */ |
| 27 | int lua_callfunction (lua_Object function); | 31 | int lua_callfunction (lua_Object f); |
| 32 | /* In: parameters; Out: returns */ | ||
| 28 | int lua_call (char *funcname); | 33 | int lua_call (char *funcname); |
| 34 | /* In: parameters; Out: returns */ | ||
| 29 | 35 | ||
| 30 | void lua_beginblock (void); | 36 | void lua_beginblock (void); |
| 31 | void lua_endblock (void); | 37 | void lua_endblock (void); |
| @@ -56,15 +62,17 @@ void lua_pushusertag (void *u, int tag); | |||
| 56 | void lua_pushobject (lua_Object object); | 62 | void lua_pushobject (lua_Object object); |
| 57 | 63 | ||
| 58 | lua_Object lua_getglobal (char *name); | 64 | lua_Object lua_getglobal (char *name); |
| 59 | void lua_storeglobal (char *name); | 65 | void lua_storeglobal (char *name); /* In: value */ |
| 60 | 66 | ||
| 61 | void lua_storesubscript (void); | 67 | void lua_storesubscript (void); /* In: table, index, value */ |
| 62 | lua_Object lua_getsubscript (void); | 68 | void lua_basicstoreindex (void); /* In: table, index, value */ |
| 69 | lua_Object lua_getsubscript (void); /* In: table, index */ | ||
| 70 | lua_Object lua_basicindex (void); /* In: table, index */ | ||
| 63 | 71 | ||
| 64 | int lua_type (lua_Object object); | 72 | int lua_tag (lua_Object object); |
| 65 | 73 | ||
| 66 | 74 | ||
| 67 | int lua_ref (int lock); | 75 | int lua_ref (int lock); /* In: value */ |
| 68 | lua_Object lua_getref (int ref); | 76 | lua_Object lua_getref (int ref); |
| 69 | void lua_pushref (int ref); | 77 | void lua_pushref (int ref); |
| 70 | void lua_unref (int ref); | 78 | void lua_unref (int ref); |
| @@ -84,6 +92,8 @@ lua_Object lua_createtable (void); | |||
| 84 | 92 | ||
| 85 | /* for compatibility with old versions. Avoid using these macros */ | 93 | /* for compatibility with old versions. Avoid using these macros */ |
| 86 | 94 | ||
| 95 | #define lua_type(o) (lua_tag(o)) | ||
| 96 | |||
| 87 | #define lua_getuserdata(o) (*(void **)lua_getbinarydata(o)) | 97 | #define lua_getuserdata(o) (*(void **)lua_getbinarydata(o)) |
| 88 | 98 | ||
| 89 | #define lua_lockobject(o) lua_refobject(o,1) | 99 | #define lua_lockobject(o) lua_refobject(o,1) |
