diff options
| -rw-r--r-- | ldo.h | 3 | ||||
| -rw-r--r-- | lmem.h | 6 | ||||
| -rw-r--r-- | lstate.h | 9 | ||||
| -rw-r--r-- | lua.h | 14 |
4 files changed, 21 insertions, 11 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.h,v 1.20 2000/04/14 18:12:35 roberto Exp $ | 2 | ** $Id: ldo.h,v 1.21 2000/06/28 20:21:06 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -25,6 +25,7 @@ void luaD_openstack (lua_State *L, StkId pos); | |||
| 25 | void luaD_lineHook (lua_State *L, StkId func, int line, lua_Hook linehook); | 25 | void luaD_lineHook (lua_State *L, StkId func, int line, lua_Hook linehook); |
| 26 | void luaD_call (lua_State *L, StkId func, int nResults); | 26 | void luaD_call (lua_State *L, StkId func, int nResults); |
| 27 | void luaD_callTM (lua_State *L, const TObject *f, int nParams, int nResults); | 27 | void luaD_callTM (lua_State *L, const TObject *f, int nParams, int nResults); |
| 28 | void luaD_breakrun (lua_State *L, int errcode); | ||
| 28 | int luaD_protectedrun (lua_State *L); | 29 | int luaD_protectedrun (lua_State *L); |
| 29 | void luaD_checkstack (lua_State *L, int n); | 30 | void luaD_checkstack (lua_State *L, int n); |
| 30 | 31 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lmem.h,v 1.13 2000/03/16 20:35:07 roberto Exp roberto $ | 2 | ** $Id: lmem.h,v 1.14 2000/05/24 13:54:49 roberto Exp roberto $ |
| 3 | ** Interface to Memory Manager | 3 | ** Interface to Memory Manager |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -13,9 +13,6 @@ | |||
| 13 | #include "llimits.h" | 13 | #include "llimits.h" |
| 14 | #include "lua.h" | 14 | #include "lua.h" |
| 15 | 15 | ||
| 16 | /* memory error message */ | ||
| 17 | #define memEM "not enough memory" | ||
| 18 | |||
| 19 | void *luaM_realloc (lua_State *L, void *oldblock, lint32 size); | 16 | void *luaM_realloc (lua_State *L, void *oldblock, lint32 size); |
| 20 | void *luaM_growaux (lua_State *L, void *block, size_t nelems, | 17 | void *luaM_growaux (lua_State *L, void *block, size_t nelems, |
| 21 | int inc, size_t size, const char *errormsg, | 18 | int inc, size_t size, const char *errormsg, |
| @@ -37,6 +34,7 @@ void *luaM_growaux (lua_State *L, void *block, size_t nelems, | |||
| 37 | extern unsigned long memdebug_numblocks; | 34 | extern unsigned long memdebug_numblocks; |
| 38 | extern unsigned long memdebug_total; | 35 | extern unsigned long memdebug_total; |
| 39 | extern unsigned long memdebug_maxmem; | 36 | extern unsigned long memdebug_maxmem; |
| 37 | extern unsigned long memdebug_memlimit; | ||
| 40 | #endif | 38 | #endif |
| 41 | 39 | ||
| 42 | 40 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.h,v 1.33 2000/05/10 16:33:20 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 1.34 2000/05/24 13:54:49 roberto Exp roberto $ |
| 3 | ** Global State | 3 | ** Global State |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -19,11 +19,14 @@ typedef TObject *StkId; /* index to stack elements */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | /* | 21 | /* |
| 22 | ** `jmp_buf' may be an array, so it is better to make sure it has an | 22 | ** chain list of long jumps |
| 23 | ** address (and not that it *is* an address...) | ||
| 24 | */ | 23 | */ |
| 25 | struct lua_longjmp { | 24 | struct lua_longjmp { |
| 26 | jmp_buf b; | 25 | jmp_buf b; |
| 26 | struct lua_longjmp *previous; | ||
| 27 | volatile int status; /* error code */ | ||
| 28 | StkId base; | ||
| 29 | int numCblocks; | ||
| 27 | }; | 30 | }; |
| 28 | 31 | ||
| 29 | 32 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.54 2000/05/26 19:17:57 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.55 2000/06/30 19:17:08 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 |
| @@ -30,6 +30,14 @@ | |||
| 30 | 30 | ||
| 31 | #define LUA_ANYTAG (-1) | 31 | #define LUA_ANYTAG (-1) |
| 32 | 32 | ||
| 33 | |||
| 34 | /* error code for lua_do* */ | ||
| 35 | #define LUA_ERRFILE 2 | ||
| 36 | #define LUA_ERRSYNTAX 3 | ||
| 37 | #define LUA_ERRRUN 1 | ||
| 38 | #define LUA_ERRMEM 4 | ||
| 39 | |||
| 40 | |||
| 33 | typedef struct lua_State lua_State; | 41 | typedef struct lua_State lua_State; |
| 34 | 42 | ||
| 35 | typedef void (*lua_CFunction) (lua_State *L); | 43 | typedef void (*lua_CFunction) (lua_State *L); |
| @@ -58,7 +66,7 @@ int lua_dostring (lua_State *L, const char *str); | |||
| 58 | int lua_dobuffer (lua_State *L, const char *buff, size_t size, | 66 | int lua_dobuffer (lua_State *L, const char *buff, size_t size, |
| 59 | const char *name); /* Out: returns */ | 67 | const char *name); /* Out: returns */ |
| 60 | int lua_callfunction (lua_State *L, lua_Object f); | 68 | int lua_callfunction (lua_State *L, lua_Object f); |
| 61 | /* In: parameters; Out: returns */ | 69 | /* In: arguments; Out: returns */ |
| 62 | 70 | ||
| 63 | void lua_beginblock (lua_State *L); | 71 | void lua_beginblock (lua_State *L); |
| 64 | void lua_endblock (lua_State *L); | 72 | void lua_endblock (lua_State *L); |
| @@ -111,7 +119,7 @@ lua_Object lua_rawget (lua_State *L); /* In: table, index */ | |||
| 111 | int lua_tag (lua_State *L, lua_Object obj); | 119 | int lua_tag (lua_State *L, lua_Object obj); |
| 112 | 120 | ||
| 113 | int lua_next (lua_State *L, lua_Object o, int i); | 121 | int lua_next (lua_State *L, lua_Object o, int i); |
| 114 | /* Out: ref, value */ | 122 | /* Out: index, value */ |
| 115 | 123 | ||
| 116 | int lua_ref (lua_State *L, int lock); /* In: value */ | 124 | int lua_ref (lua_State *L, int lock); /* In: value */ |
| 117 | lua_Object lua_getref (lua_State *L, int ref); | 125 | lua_Object lua_getref (lua_State *L, int ref); |
