aboutsummaryrefslogtreecommitdiff
path: root/ldo.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-30 11:41:39 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-30 11:41:39 -0300
commitd1e677c52be3b107a7a29fdc482158f6d9251e79 (patch)
tree6b201f229a9dc1f0752f6544b71498a4d528941d /ldo.h
parentf7439112a5469078ac4f444106242cf1c1d3fe8a (diff)
downloadlua-d1e677c52be3b107a7a29fdc482158f6d9251e79.tar.gz
lua-d1e677c52be3b107a7a29fdc482158f6d9251e79.tar.bz2
lua-d1e677c52be3b107a7a29fdc482158f6d9251e79.zip
New type 'TStatus' for thread status/error codes
Diffstat (limited to 'ldo.h')
-rw-r--r--ldo.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/ldo.h b/ldo.h
index b52a353f..ea1655e1 100644
--- a/ldo.h
+++ b/ldo.h
@@ -67,8 +67,9 @@
67/* type of protected functions, to be ran by 'runprotected' */ 67/* type of protected functions, to be ran by 'runprotected' */
68typedef void (*Pfunc) (lua_State *L, void *ud); 68typedef void (*Pfunc) (lua_State *L, void *ud);
69 69
70LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop); 70LUAI_FUNC void luaD_seterrorobj (lua_State *L, TStatus errcode, StkId oldtop);
71LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, 71LUAI_FUNC TStatus luaD_protectedparser (lua_State *L, ZIO *z,
72 const char *name,
72 const char *mode); 73 const char *mode);
73LUAI_FUNC void luaD_hook (lua_State *L, int event, int line, 74LUAI_FUNC void luaD_hook (lua_State *L, int event, int line,
74 int fTransfer, int nTransfer); 75 int fTransfer, int nTransfer);
@@ -78,8 +79,9 @@ LUAI_FUNC int luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func,
78LUAI_FUNC CallInfo *luaD_precall (lua_State *L, StkId func, int nResults); 79LUAI_FUNC CallInfo *luaD_precall (lua_State *L, StkId func, int nResults);
79LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults); 80LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults);
80LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults); 81LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults);
81LUAI_FUNC int luaD_closeprotected (lua_State *L, ptrdiff_t level, int status); 82LUAI_FUNC TStatus luaD_closeprotected (lua_State *L, ptrdiff_t level,
82LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, 83 TStatus status);
84LUAI_FUNC TStatus luaD_pcall (lua_State *L, Pfunc func, void *u,
83 ptrdiff_t oldtop, ptrdiff_t ef); 85 ptrdiff_t oldtop, ptrdiff_t ef);
84LUAI_FUNC void luaD_poscall (lua_State *L, CallInfo *ci, int nres); 86LUAI_FUNC void luaD_poscall (lua_State *L, CallInfo *ci, int nres);
85LUAI_FUNC int luaD_reallocstack (lua_State *L, int newsize, int raiseerror); 87LUAI_FUNC int luaD_reallocstack (lua_State *L, int newsize, int raiseerror);
@@ -87,8 +89,8 @@ LUAI_FUNC int luaD_growstack (lua_State *L, int n, int raiseerror);
87LUAI_FUNC void luaD_shrinkstack (lua_State *L); 89LUAI_FUNC void luaD_shrinkstack (lua_State *L);
88LUAI_FUNC void luaD_inctop (lua_State *L); 90LUAI_FUNC void luaD_inctop (lua_State *L);
89 91
90LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode); 92LUAI_FUNC l_noret luaD_throw (lua_State *L, TStatus errcode);
91LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); 93LUAI_FUNC TStatus luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
92 94
93#endif 95#endif
94 96