summaryrefslogtreecommitdiff
path: root/ldo.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-04-22 11:40:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-04-22 11:40:50 -0300
commitee4859b3e3db6c1a3223669d15538b3852ca4791 (patch)
treea9a9532c03f0a9bc58599e34457cb618aa5f11f2 /ldo.h
parentf388ee4a822b3d8027ed7c28aa21e9406e4a11eb (diff)
downloadlua-ee4859b3e3db6c1a3223669d15538b3852ca4791.tar.gz
lua-ee4859b3e3db6c1a3223669d15538b3852ca4791.tar.bz2
lua-ee4859b3e3db6c1a3223669d15538b3852ca4791.zip
new way to handle errors (temporary version)
Diffstat (limited to 'ldo.h')
-rw-r--r--ldo.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/ldo.h b/ldo.h
index 2eb5f43b..5464e544 100644
--- a/ldo.h
+++ b/ldo.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.h,v 1.41 2002/03/20 12:52:32 roberto Exp roberto $ 2** $Id: ldo.h,v 1.42 2002/03/25 17:47:14 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*/
@@ -10,6 +10,7 @@
10 10
11#include "lobject.h" 11#include "lobject.h"
12#include "lstate.h" 12#include "lstate.h"
13#include "lzio.h"
13 14
14 15
15/* 16/*
@@ -27,17 +28,22 @@
27#define restorestack(L,n) ((TObject *)((char *)L->stack + (n))) 28#define restorestack(L,n) ((TObject *)((char *)L->stack + (n)))
28 29
29 30
31/* type of protected functions, to be ran by `runprotected' */
32typedef void (*Pfunc) (lua_State *L, void *v);
33
34int luaD_protectedparser (lua_State *L, ZIO *z, int bin);
30void luaD_lineHook (lua_State *L, int line); 35void luaD_lineHook (lua_State *L, int line);
31StkId luaD_precall (lua_State *L, StkId func); 36StkId luaD_precall (lua_State *L, StkId func);
32void luaD_call (lua_State *L, StkId func, int nResults); 37void luaD_call (lua_State *L, StkId func, int nResults);
38int luaD_pcall (lua_State *L, int nargs, int nresults, const TObject *err);
33void luaD_poscall (lua_State *L, int wanted, StkId firstResult); 39void luaD_poscall (lua_State *L, int wanted, StkId firstResult);
34void luaD_reallocCI (lua_State *L, int newsize); 40void luaD_reallocCI (lua_State *L, int newsize);
35void luaD_reallocstack (lua_State *L, int newsize); 41void luaD_reallocstack (lua_State *L, int newsize);
36void luaD_growstack (lua_State *L, int n); 42void luaD_growstack (lua_State *L, int n);
37 43
38void luaD_error (lua_State *L, const char *s); 44void luaD_error (lua_State *L, const char *s, int errcode);
39void luaD_breakrun (lua_State *L, int errcode); 45void luaD_runerror (lua_State *L, const char *s);
40int luaD_runprotected (lua_State *L, void (*f)(lua_State *, void *), void *ud); 46int luaD_runprotected (lua_State *L, Pfunc f, const TObject *err, void *ud);
41 47
42 48
43#endif 49#endif