New type 'TStatus' for thread status/error codes

This commit is contained in:
Roberto Ierusalimschy
2025-01-30 11:41:39 -03:00
parent f7439112a5
commit d1e677c52b
10 changed files with 56 additions and 46 deletions

View File

@@ -329,7 +329,7 @@ TString *luaS_newextlstr (lua_State *L,
if (!falloc)
f_pintern(L, &ne); /* just internalize string */
else {
int status = luaD_rawrunprotected(L, f_pintern, &ne);
TStatus status = luaD_rawrunprotected(L, f_pintern, &ne);
(*falloc)(ud, cast_voidp(s), len + 1, 0); /* free external string */
if (status != LUA_OK) /* memory error? */
luaM_error(L); /* re-raise memory error */