File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ class Namespace : public detail::Registrar
155
155
156
156
if (Security::hideMetatables ())
157
157
{
158
- lua_pushnil (L );
158
+ lua_pushboolean (L, 0 );
159
159
rawsetfield (L, -2 , " __metatable" );
160
160
}
161
161
}
@@ -221,7 +221,7 @@ class Namespace : public detail::Registrar
221
221
222
222
if (Security::hideMetatables ())
223
223
{
224
- lua_pushnil (L );
224
+ lua_pushboolean (L, 0 );
225
225
rawsetfield (L, -2 , " __metatable" );
226
226
}
227
227
}
@@ -1041,6 +1041,12 @@ class Namespace : public detail::Registrar
1041
1041
lua_newtable (L); // Stack: pns, ns, propset table (ps)
1042
1042
lua_rawsetp (L, -2 , detail::getPropsetKey ()); // ns [propsetKey] = ps. Stack: pns, ns
1043
1043
1044
+ if (Security::hideMetatables ())
1045
+ {
1046
+ lua_pushboolean (L, 0 );
1047
+ rawsetfield (L, -2 , " __metatable" );
1048
+ }
1049
+
1044
1050
// pns [name] = ns
1045
1051
lua_pushvalue (L, -1 ); // Stack: pns, ns, ns
1046
1052
rawsetfield (L, -3 , name); // Stack: pns, ns
You can’t perform that action at this time.
0 commit comments