24 TInterpreter* gCling =
nullptr;
25 static TInterpreter *gInterpreterLocal =
nullptr;
29 static struct AddPseudoGlobals {
33 TGlobalMappedFunction::MakeFunctor(
"gInterpreter",
"TInterpreter*", TInterpreter::Instance, [] {
34 TInterpreter::Instance();
35 return (
void *) &gInterpreterLocal;
43 ClassImp(TInterpreter);
48 TInterpreter::TInterpreter(
const char *name,
const char *title)
51 gInterpreterLocal =
this;
58 TInterpreter *TInterpreter::Instance()
60 if (gInterpreterLocal == 0) {
61 static TROOT *getROOT = ROOT::GetROOT();
63 ::Fatal(
"TInterpreter::Instance",
"TROOT object is required before accessing a TInterpreter");
66 return gInterpreterLocal;