mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-08-30 00:33:19 +00:00
upm: fix removed Python 2 C-API symbol in carrays_uint32_t.i
PyInt_AsLong is a Python 2 C-API name with no fallback definition in Python 3.14, so any SWIG module that %includes this file (e.g. hmtrp) fails to compile: hmtrpPYTHON_wrap.cxx:7351:14: error: use of undeclared identifier 'PyInt_AsLong'; did you mean 'PyLong_AsLong'? Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
From: Khem Raj <khem.raj@oss.qualcomm.com>
|
||||
Subject: carrays_uint32_t.i: use PyLong_AsLong instead of PyInt_AsLong
|
||||
|
||||
PyInt_AsLong is a Python 2 C-API name with no fallback definition in
|
||||
Python 3.14, so any SWIG module that %includes this file (e.g. hmtrp)
|
||||
fails to compile:
|
||||
|
||||
hmtrpPYTHON_wrap.cxx:7351:14: error: use of undeclared identifier 'PyInt_AsLong'; did you mean 'PyLong_AsLong'?
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
||||
---
|
||||
--- a/src/carrays_uint32_t.i
|
||||
+++ b/src/carrays_uint32_t.i
|
||||
@@ -45,7 +45,7 @@
|
||||
long v;
|
||||
int res = SWIG_AsVal_long ($input, &v);
|
||||
if (SWIG_IsOK(res)) {
|
||||
- $1 = PyInt_AsLong($input);
|
||||
+ $1 = PyLong_AsLong($input);
|
||||
}
|
||||
else {
|
||||
SWIG_exception_fail(SWIG_ArgError(res), "failed to convert uint32");
|
||||
@@ -17,6 +17,7 @@ SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=https;branch=master \
|
||||
file://0001-cmake-Disable-Wno-misleading-indentation-with-clang-.patch \
|
||||
file://0001-cmake-Disable-using-Wno-maybe-uninitialized.patch \
|
||||
file://0001-include-missing-cstdint.patch \
|
||||
file://0002-carrays_uint32_t.i-use-PyLong_AsLong-instead-of-PyI.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:toolchain-clang:x86 = " file://0001-nmea_gps-Link-with-latomic.patch "
|
||||
|
||||
Reference in New Issue
Block a user