Mercurial Hosting > luan
diff src/luan/modules/BasicLuan.java @ 1166:7ef40e1923b7
add back Thread.global
allow metatables to have metatables
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 08 Feb 2018 02:22:51 -0700 |
parents | 1f9d34a6f308 |
children | 73d754b1889f |
line wrap: on
line diff
--- a/src/luan/modules/BasicLuan.java Wed Feb 07 23:16:12 2018 -0700 +++ b/src/luan/modules/BasicLuan.java Thu Feb 08 02:22:51 2018 -0700 @@ -71,9 +71,9 @@ return obj!=null ? obj : metatable; } - public static void set_metatable(LuanTable table,LuanTable metatable) throws LuanException { + public static void set_metatable(LuanState luan,LuanTable table,LuanTable metatable) throws LuanException { Utils.checkNotNull(table); - if( table.getHandler("__metatable") != null ) + if( table.getHandler(luan,"__metatable") != null ) throw new LuanException("cannot change a protected metatable"); table.setMetatable(metatable); }