mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
api_check
This commit is contained in:
parent
f76b693dfb
commit
0fbc918889
1 changed files with 1 additions and 2 deletions
|
@ -704,8 +704,7 @@ void lua_setreadonly(lua_State* L, int objindex, bool value)
|
|||
const TValue* o = index2adr(L, objindex);
|
||||
api_check(L, ttistable(o));
|
||||
Table* t = hvalue(o);
|
||||
if (value && t == hvalue(registry(L)))
|
||||
luaG_runerror(L, "Attempt to set the registry to readonly");
|
||||
api_check(L, t != hvalue(registry(L)));
|
||||
t->readonly = value;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue