diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-30 11:41:39 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-30 11:41:39 -0300 |
commit | d1e677c52be3b107a7a29fdc482158f6d9251e79 (patch) | |
tree | 6b201f229a9dc1f0752f6544b71498a4d528941d /ldo.h | |
parent | f7439112a5469078ac4f444106242cf1c1d3fe8a (diff) | |
download | lua-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.h | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -67,8 +67,9 @@ | |||
67 | /* type of protected functions, to be ran by 'runprotected' */ | 67 | /* type of protected functions, to be ran by 'runprotected' */ |
68 | typedef void (*Pfunc) (lua_State *L, void *ud); | 68 | typedef void (*Pfunc) (lua_State *L, void *ud); |
69 | 69 | ||
70 | LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop); | 70 | LUAI_FUNC void luaD_seterrorobj (lua_State *L, TStatus errcode, StkId oldtop); |
71 | LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, | 71 | LUAI_FUNC TStatus luaD_protectedparser (lua_State *L, ZIO *z, |
72 | const char *name, | ||
72 | const char *mode); | 73 | const char *mode); |
73 | LUAI_FUNC void luaD_hook (lua_State *L, int event, int line, | 74 | LUAI_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, | |||
78 | LUAI_FUNC CallInfo *luaD_precall (lua_State *L, StkId func, int nResults); | 79 | LUAI_FUNC CallInfo *luaD_precall (lua_State *L, StkId func, int nResults); |
79 | LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults); | 80 | LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults); |
80 | LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults); | 81 | LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults); |
81 | LUAI_FUNC int luaD_closeprotected (lua_State *L, ptrdiff_t level, int status); | 82 | LUAI_FUNC TStatus luaD_closeprotected (lua_State *L, ptrdiff_t level, |
82 | LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, | 83 | TStatus status); |
84 | LUAI_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); |
84 | LUAI_FUNC void luaD_poscall (lua_State *L, CallInfo *ci, int nres); | 86 | LUAI_FUNC void luaD_poscall (lua_State *L, CallInfo *ci, int nres); |
85 | LUAI_FUNC int luaD_reallocstack (lua_State *L, int newsize, int raiseerror); | 87 | LUAI_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); | |||
87 | LUAI_FUNC void luaD_shrinkstack (lua_State *L); | 89 | LUAI_FUNC void luaD_shrinkstack (lua_State *L); |
88 | LUAI_FUNC void luaD_inctop (lua_State *L); | 90 | LUAI_FUNC void luaD_inctop (lua_State *L); |
89 | 91 | ||
90 | LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode); | 92 | LUAI_FUNC l_noret luaD_throw (lua_State *L, TStatus errcode); |
91 | LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); | 93 | LUAI_FUNC TStatus luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); |
92 | 94 | ||
93 | #endif | 95 | #endif |
94 | 96 | ||