From f388ee4a822b3d8027ed7c28aa21e9406e4a11eb Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 22 Apr 2002 11:40:23 -0300 Subject: new way to handle errors --- lua.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lua.h') diff --git a/lua.h b/lua.h index 4764e1d1..52db9d61 100644 --- a/lua.h +++ b/lua.h @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.126 2002/04/05 18:54:31 roberto Exp roberto $ +** $Id: lua.h,v 1.127 2002/04/16 17:08:28 roberto Exp roberto $ ** Lua - An Extensible Extension Language ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil ** e-mail: info@lua.org @@ -22,9 +22,6 @@ #define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo" -/* name of global variable with error handler */ -#define LUA_ERRORMESSAGE "_ERRORMESSAGE" - /* option for multiple returns in `lua_call' */ #define LUA_MULTRET (-1) @@ -173,11 +170,12 @@ LUA_API void lua_setmetatable (lua_State *L, int objindex); */ LUA_API int lua_call (lua_State *L, int nargs, int nresults); LUA_API void lua_rawcall (lua_State *L, int nargs, int nresults); +LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errf); LUA_API int lua_loadfile (lua_State *L, const char *filename); -LUA_API int lua_dofile (lua_State *L, const char *filename); -LUA_API int lua_dostring (lua_State *L, const char *str); LUA_API int lua_loadbuffer (lua_State *L, const char *buff, size_t size, const char *name); +LUA_API int lua_dofile (lua_State *L, const char *filename); +LUA_API int lua_dostring (lua_State *L, const char *str); LUA_API int lua_dobuffer (lua_State *L, const char *buff, size_t size, const char *name); -- cgit v1.2.3-55-g6feb