summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldo.h3
-rw-r--r--lmem.h6
-rw-r--r--lstate.h9
-rw-r--r--lua.h14
4 files changed, 21 insertions, 11 deletions
diff --git a/ldo.h b/ldo.h
index 67d3f5fc..0e91c7c8 100644
--- a/ldo.h
+++ b/ldo.h
@@ -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);
25void luaD_lineHook (lua_State *L, StkId func, int line, lua_Hook linehook); 25void luaD_lineHook (lua_State *L, StkId func, int line, lua_Hook linehook);
26void luaD_call (lua_State *L, StkId func, int nResults); 26void luaD_call (lua_State *L, StkId func, int nResults);
27void luaD_callTM (lua_State *L, const TObject *f, int nParams, int nResults); 27void luaD_callTM (lua_State *L, const TObject *f, int nParams, int nResults);
28void luaD_breakrun (lua_State *L, int errcode);
28int luaD_protectedrun (lua_State *L); 29int luaD_protectedrun (lua_State *L);
29void luaD_checkstack (lua_State *L, int n); 30void luaD_checkstack (lua_State *L, int n);
30 31
diff --git a/lmem.h b/lmem.h
index 55e2feab..f1630238 100644
--- a/lmem.h
+++ b/lmem.h
@@ -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
19void *luaM_realloc (lua_State *L, void *oldblock, lint32 size); 16void *luaM_realloc (lua_State *L, void *oldblock, lint32 size);
20void *luaM_growaux (lua_State *L, void *block, size_t nelems, 17void *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,
37extern unsigned long memdebug_numblocks; 34extern unsigned long memdebug_numblocks;
38extern unsigned long memdebug_total; 35extern unsigned long memdebug_total;
39extern unsigned long memdebug_maxmem; 36extern unsigned long memdebug_maxmem;
37extern unsigned long memdebug_memlimit;
40#endif 38#endif
41 39
42 40
diff --git a/lstate.h b/lstate.h
index 36cecb0b..70bc4600 100644
--- a/lstate.h
+++ b/lstate.h
@@ -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*/
25struct lua_longjmp { 24struct 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
diff --git a/lua.h b/lua.h
index b6bd9305..f5d2e0ce 100644
--- a/lua.h
+++ b/lua.h
@@ -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
33typedef struct lua_State lua_State; 41typedef struct lua_State lua_State;
34 42
35typedef void (*lua_CFunction) (lua_State *L); 43typedef void (*lua_CFunction) (lua_State *L);
@@ -58,7 +66,7 @@ int lua_dostring (lua_State *L, const char *str);
58int lua_dobuffer (lua_State *L, const char *buff, size_t size, 66int lua_dobuffer (lua_State *L, const char *buff, size_t size,
59 const char *name); /* Out: returns */ 67 const char *name); /* Out: returns */
60int lua_callfunction (lua_State *L, lua_Object f); 68int lua_callfunction (lua_State *L, lua_Object f);
61 /* In: parameters; Out: returns */ 69 /* In: arguments; Out: returns */
62 70
63void lua_beginblock (lua_State *L); 71void lua_beginblock (lua_State *L);
64void lua_endblock (lua_State *L); 72void lua_endblock (lua_State *L);
@@ -111,7 +119,7 @@ lua_Object lua_rawget (lua_State *L); /* In: table, index */
111int lua_tag (lua_State *L, lua_Object obj); 119int lua_tag (lua_State *L, lua_Object obj);
112 120
113int lua_next (lua_State *L, lua_Object o, int i); 121int lua_next (lua_State *L, lua_Object o, int i);
114 /* Out: ref, value */ 122 /* Out: index, value */
115 123
116int lua_ref (lua_State *L, int lock); /* In: value */ 124int lua_ref (lua_State *L, int lock); /* In: value */
117lua_Object lua_getref (lua_State *L, int ref); 125lua_Object lua_getref (lua_State *L, int ref);