Skip to content
Snippets Groups Projects
Commit 6e5d9d99 authored by marco's avatar marco
Browse files

change reset_sinks hack to work with older boost versions

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2728 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 7861c817
No related branches found
No related tags found
No related merge requests found
...@@ -116,6 +116,8 @@ void export_Logger() ...@@ -116,6 +116,8 @@ void export_Logger()
// the sink stack, we will get "Fatal Python error: PyEval_SaveThread: // the sink stack, we will get "Fatal Python error: PyEval_SaveThread:
// NULL tstate" upon exiting ost. I don't completely understand why, though. // NULL tstate" upon exiting ost. I don't completely understand why, though.
scope().attr("__dict__")["atexit"]=import("atexit"); scope().attr("__dict__")["atexit"]=import("atexit");
def("_reset_sinks", &reset_sinks); 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