From dabab90415e5786b2712c16764072a364ef2d5c2 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 12 Sep 2020 22:50:03 +0200 Subject: [PATCH] interrogate: Fix compilation error of bindings with Python 3.9+ --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 2a90a4b1db..bf0ff5d333 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -6545,7 +6545,9 @@ write_make_seq(ostream &out, Object *obj, const std::string &ClassName, "\n"; if ((elem_getter->_args_type & AT_varargs) == AT_varargs) { + out << "#if defined(Py_TRACE_REFS) || PY_VERSION_HEX < 0x03090000\n"; out << " _Py_ForgetReference((PyObject *)&args);\n"; + out << "#endif\n"; } out <<