Skip to content
Snippets Groups Projects
Commit aa0a4aee authored by Marco Biasini's avatar Marco Biasini
Browse files

change reset_sinks hack to work with older boost versions

parent c03972f8
Branches
Tags
No related merge requests found
......@@ -116,6 +116,8 @@ void export_Logger()
// the sink stack, we will get "Fatal Python error: PyEval_SaveThread:
// NULL tstate" upon exiting ost. I don't completely understand why, though.
scope().attr("__dict__")["atexit"]=import("atexit");
def("_reset_sinks", &reset_sinks);
exec("atexit.register(_reset_sinks)", scope().attr("__dict__"));
object r=scope().attr("_reset_sinks");
scope().attr("atexit").attr("register")(r);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment