summaryrefslogtreecommitdiff
path: root/ldo.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-05 14:36:24 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-05 14:36:24 -0300
commit4e23699aa647fd9dc04933bf5582217ca594c8ce (patch)
tree03d4f407c2f8974a62837a7d71f417c833aedd99 /ldo.h
parent1c0ac3c0f53720c53dcfae13308b11b29dca38e4 (diff)
downloadlua-4e23699aa647fd9dc04933bf5582217ca594c8ce.tar.gz
lua-4e23699aa647fd9dc04933bf5582217ca594c8ce.tar.bz2
lua-4e23699aa647fd9dc04933bf5582217ca594c8ce.zip
new implementation for error handling
Diffstat (limited to 'ldo.h')
-rw-r--r--ldo.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/ldo.h b/ldo.h
index c18193d1..fdd889ed 100644
--- a/ldo.h
+++ b/ldo.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.h,v 1.47 2002/06/18 17:10:43 roberto Exp roberto $ 2** $Id: ldo.h,v 1.48 2002/07/08 18:21:33 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*/
@@ -27,10 +27,14 @@
27#define savestack(L,p) ((char *)(p) - (char *)L->stack) 27#define savestack(L,p) ((char *)(p) - (char *)L->stack)
28#define restorestack(L,n) ((TObject *)((char *)L->stack + (n))) 28#define restorestack(L,n) ((TObject *)((char *)L->stack + (n)))
29 29
30#define saveci(L,p) ((char *)(p) - (char *)L->base_ci)
31#define restoreci(L,n) ((CallInfo *)((char *)L->base_ci + (n)))
32
30 33
31/* type of protected functions, to be ran by `runprotected' */ 34/* type of protected functions, to be ran by `runprotected' */
32typedef void (*Pfunc) (lua_State *L, void *v); 35typedef void (*Pfunc) (lua_State *L, void *ud);
33 36
37void luaD_resetprotection (lua_State *L);
34int luaD_protectedparser (lua_State *L, ZIO *z, int bin); 38int luaD_protectedparser (lua_State *L, ZIO *z, int bin);
35void luaD_callhook (lua_State *L, lua_Hookevent event, int line); 39void luaD_callhook (lua_State *L, lua_Hookevent event, int line);
36StkId luaD_precall (lua_State *L, StkId func); 40StkId luaD_precall (lua_State *L, StkId func);
@@ -42,8 +46,7 @@ void luaD_reallocstack (lua_State *L, int newsize);
42void luaD_growstack (lua_State *L, int n); 46void luaD_growstack (lua_State *L, int n);
43 47
44void luaD_throw (lua_State *L, int errcode); 48void luaD_throw (lua_State *L, int errcode);
45int luaD_runprotected (lua_State *L, Pfunc f, TObject *ud); 49int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
46int luaD_isprotected (lua_State *L, CallInfo *ci);
47 50
48 51
49#endif 52#endif