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

@@ -24,9 +24,6 @@ package org.luaj.vm2;
import java.io.IOException;
import java.io.InputStream;
import org.luaj.vm2.compiler.LuaC;
import org.luaj.vm2.lib.BaseLib;
/**
* Test argument type check errors
@@ -47,7 +44,7 @@ public class ErrorsTest extends ScriptDrivenTest {
}
public void testBaseLibArgs() {
BaseLib.instance.STDIN = new InputStream() {
globals.STDIN = new InputStream() {
public int read() throws IOException {
return -1;
}