Move static variables used by libraries into explicit Globals object for better thread safety.

This commit is contained in:
James Roseborough
2012-09-14 04:12:50 +00:00
parent 9f3aef6403
commit f786802bf1
30 changed files with 739 additions and 1000 deletions

View File

@@ -38,8 +38,8 @@ public class MetatableTest extends TestCase {
private final LuaValue string = LuaValue.valueOf(samplestring);
private final LuaTable table = LuaValue.tableOf();
private final LuaFunction function = new ZeroArgFunction() { public LuaValue call() { return NONE;}};
private final LuaThread thread = new LuaThread(function);
private final LuaClosure closure = new LuaClosure(new Prototype());
private final LuaThread thread = new LuaThread(new Globals(), function);
private final LuaClosure closure = new LuaClosure(new Prototype(), new LuaTable());
private final LuaUserdata userdata = LuaValue.userdataOf(sampleobject);
private final LuaUserdata userdatamt = LuaValue.userdataOf(sampledata,table);