root/root-PyROOT-Prevent-cast-error-when-calling-PyTuple_SET_I.patch
Mattias Ellert 7add16520d Update to 6.24.08
Drop patches accepted upstream:
  root-fix-ppc64le-compilation-with-gcc-10.patch
  root-ppc-codemodel.patch
  root-ppc-segfault-fix.patch
Drop the doxygen generated root-doc package (doxygen runs out of memory)
Backport python 3.11 fixes from upstream
Various test fixes - patches from the rawhide build
Don't use yuicompressor on Fedora (Java no longer available on ix86)
Backport locking of gInterpreterMutex in TClingClassInfo::IsEnum
2022-10-22 19:04:17 +02:00

29 lines
1.2 KiB
Diff

From a12f3b736a9c69e0d69e7f483e50e7cdf59d9fd2 Mon Sep 17 00:00:00 2001
From: Enric Tejedor Saavedra <enric.tejedor.saavedra@cern.ch>
Date: Fri, 10 Jun 2022 16:42:49 +0200
Subject: [PATCH] [PyROOT] Prevent cast error when calling PyTuple_SET_ITEM in
3.11
PyTuple_SET_ITEM ends up calling _PyObject_CAST(nullptr) which
causes "error: invalid cast from type 'std::nullptr_t' to type
'const PyObject*' {aka 'const _object*'}
---
bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx b/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx
index 685ad3dc60..2189348594 100644
--- a/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx
+++ b/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx
@@ -580,7 +580,7 @@ PyObject* CPyCppyy::CPPMethod::ProcessKeywords(PyObject* self, PyObject* args, P
// set all values to zero to be able to check them later (this also guarantees normal
// cleanup by the tuple deallocation)
for (Py_ssize_t i = 0; i < nArgs+nKeys; ++i)
- PyTuple_SET_ITEM(newArgs, i, nullptr);
+ PyTuple_SET_ITEM(newArgs, i, static_cast<PyObject*>(nullptr));
// next, insert the keyword values
PyObject *key, *value;
--
2.36.1