First "complete" implementation of to-be-closed variables

Still missing:
- handling of memory errors when creating upvalue (must run closing
method all the same)
- interaction with coroutines
This commit is contained in:
Roberto Ierusalimschy
2018-10-17 10:44:42 -03:00
parent 4cd1f4aac0
commit bd96330d03
13 changed files with 145 additions and 26 deletions

View File

@@ -1208,7 +1208,7 @@ static int getindex_aux (lua_State *L, lua_State *L1, const char **pc) {
static void pushcode (lua_State *L, int code) {
static const char *const codes[] = {"OK", "YIELD", "ERRRUN",
"ERRSYNTAX", "ERRMEM", "ERRGCMM", "ERRERR"};
"ERRSYNTAX", MEMERRMSG, "ERRGCMM", "ERRERR"};
lua_pushstring(L, codes[code]);
}