diff options
Diffstat (limited to 'deps/lua/src/lapi.c')
-rw-r--r-- | deps/lua/src/lapi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/deps/lua/src/lapi.c b/deps/lua/src/lapi.c index 1a9455629..e8ef41ea2 100644 --- a/deps/lua/src/lapi.c +++ b/deps/lua/src/lapi.c @@ -1099,3 +1099,11 @@ LUA_API void lua_enablereadonlytable (lua_State *L, int objindex, int enabled) { t->readonly = enabled; } +LUA_API int lua_isreadonlytable (lua_State *L, int objindex) { + const TValue* o = index2adr(L, objindex); + api_check(L, ttistable(o)); + Table* t = hvalue(o); + api_check(L, t != hvalue(registry(L))); + return t->readonly; +} + |