| 1073 | #ifdef LUA_READONLY_TABLES |
| 1074 | |
| 1075 | LUA_API int lua_getreadonly (lua_State *L, int idx) { /*BZ*/ |
| 1076 | StkId o; |
| 1077 | Table* t; |
| 1078 | lu_byte readonly; |
| 1079 | lua_lock(L); |
| 1080 | api_checknelems(L, 1); |
| 1081 | o = index2adr(L, idx); |
| 1082 | api_check(L, ttistable(o)); |
| 1083 | t = hvalue(o); |
| 1084 | readonly = t->readonly; |
| 1085 | lua_unlock(L); |
| 1086 | return cast(int, readonly); |
| 1087 | } |
| 1088 | |
| 1089 | |
| 1090 | LUA_API void lua_setreadonly (lua_State *L, int idx, int state) { /*BZ*/ |