Move DEBUG_ENABLED flag
This commit is contained in:
@@ -103,14 +103,13 @@ public class DebugLib extends OneArgFunction {
|
||||
private static final LuaString ACTIVELINES = valueOf("activelines");
|
||||
|
||||
public DebugLib() {
|
||||
DEBUG_ENABLED = true;
|
||||
}
|
||||
|
||||
public LuaValue call(LuaValue arg) {
|
||||
LuaTable t = new LuaTable();
|
||||
bindv(t, NAMES);
|
||||
env.set("debug", t);
|
||||
if ( ! DEBUG_ENABLED )
|
||||
DEBUG_ENABLED = true;
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ public class JsePlatform {
|
||||
_G.load(new TableLib());
|
||||
_G.load(new StringLib());
|
||||
_G.load(new CoroutineLib());
|
||||
_G.load(new DebugLib());
|
||||
_G.load(new JseMathLib());
|
||||
_G.load(new JseIoLib());
|
||||
_G.load(new JseOsLib());
|
||||
@@ -51,4 +50,10 @@ public class JsePlatform {
|
||||
LuaThread.setGlobals(_G);
|
||||
return _G;
|
||||
}
|
||||
|
||||
public static LuaTable debugGlobals() {
|
||||
LuaTable _G = standardGlobals();
|
||||
_G.load(new DebugLib());
|
||||
return _G;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user