mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
14 lines
495 B
Diff
14 lines
495 B
Diff
--- a/bindings/pyroot/src/TCustomPyTypes.cxx
|
|
+++ b/bindings/pyroot/src/TCustomPyTypes.cxx
|
|
@@ -240,7 +240,11 @@
|
|
// the function is globally shared, so set and reset its "self" (ok, b/c of GIL)
|
|
Py_INCREF( self );
|
|
func->m_self = self;
|
|
+#if PY_VERSION_HEX >= 0x03090000
|
|
+ PyObject* result = PyObject_Call( (PyObject*)func, args, kw );
|
|
+#else
|
|
PyObject* result = PyCFunction_Call( (PyObject*)func, args, kw );
|
|
+#endif
|
|
func->m_self = 0;
|
|
Py_DECREF( self );
|
|
Py_DECREF( args );
|