Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bindings/pyroot/pythonizations/python/ROOT/_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ def _finalSetup(self):
from ._application import PyROOTApplication
from ._pythonization import _register_pythonizations, pythonization

# signal policy: don't abort interpreter in interactive mode
cppyy._backend.SetGlobalSignalPolicy(not cppyy.gbl.ROOT.GetROOT().IsBatch())

self.__dict__["_cppyy"] = cppyy

# Expose some functionality from CPyCppyy extension module
Expand Down
9 changes: 0 additions & 9 deletions bindings/pyroot/pythonizations/src/PyROOTModule.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ struct module_state {
PyObject *error;
};

using namespace CPyCppyy;

#define GETSTATE(m) ((struct module_state *)PyModule_GetState(m))

static int rootmodule_traverse(PyObject *m, visitproc visit, void *arg)
Expand Down Expand Up @@ -206,12 +204,5 @@ extern "C" PyObject *PyInit_libROOTPythonizations()
// keep gRootModule, but do not increase its reference count even as it is borrowed,
// or a self-referencing cycle would be created

// Make sure the interpreter is initialized once gROOT has been initialized
TInterpreter::Instance();

// signal policy: don't abort interpreter in interactive mode
CallContext::SetGlobalPolicy(CallContext::kProtected, !gROOT->IsBatch());

Py_INCREF(gRootModule);
return gRootModule;
}
Loading