File tree Expand file tree Collapse file tree
src/py-opentimelineio/opentimelineio-bindings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ if(WIN32)
191191 # Windows debug builds for Python require a d in order for the module to
192192 # load. This also helps ensure that debug builds in general are matched
193193 # to the Microsoft debug CRT.
194- set (OTIO_DEBUG_POSTFIX "d " )
194+ set (OTIO_DEBUG_POSTFIX "_d " )
195195endif ()
196196
197197set_property (GLOBAL PROPERTY USE_FOLDERS ON )
Original file line number Diff line number Diff line change @@ -98,10 +98,13 @@ void _build_any_to_py_dispatch_table() {
9898 }
9999}
100100
101- static py::object _value_to_any = py::none();
101+ // Initialized lazily after the interpreter is ready.
102+ // constructing py::none() at static init time triggers
103+ // pybind11 GIL assertions in Debug builds.
104+ static py::object _value_to_any;
102105
103106static void py_to_any (py::object const & o, std::any* result) {
104- if (_value_to_any.is_none ()) {
107+ if (!_value_to_any || _value_to_any.is_none ()) {
105108 py::object core = py::module::import (" opentimelineio.core" );
106109 _value_to_any = core.attr (" _value_to_any" );
107110 }
You can’t perform that action at this time.
0 commit comments