Skip to content

Commit d809165

Browse files
committed
COMP: Remove _Py_HashPointer as undefined symbol.
1 parent c9a6302 commit d809165

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

src/PythonQtSignal.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,19 +350,19 @@ meth_compare(PythonQtSignalFunctionObject *a, PythonQtSignalFunctionObject *b)
350350
static long
351351
meth_hash(PythonQtSignalFunctionObject *a)
352352
{
353-
long x,y;
353+
long x;
354354
if (a->m_self == nullptr)
355355
x = 0;
356356
else {
357357
x = PyObject_Hash(a->m_self);
358358
if (x == -1)
359359
return -1;
360360
}
361-
#if PY_VERSION_HEX >= 0x30D0000 /* 0x30D0000 == 3.13.0a0 */
362-
y = Py_HashPointer((void*)(a->m_ml)); /* public in 3.13+ */
363-
#elif !defined(Py_LIMITED_API)
364-
/* fallback: use CPython’s private helper (requires full API) */
365-
y = _Py_HashPointer((void*)(a->m_ml));
361+
#if 0 // PY_VERSION_HEX >= 0x30D0000 /* 0x30D0000 == 3.13.0a0 */
362+
// y = Py_HashPointer((void*)(a->m_ml)); /* public in 3.13+ */
363+
// #elif !defined(Py_LIMITED_API)
364+
// /* fallback: use CPython’s private helper (requires full API) */
365+
// y = _Py_HashPointer((void*)(a->m_ml));
366366
#else
367367
/* portable fallback for the limited/stable ABI */
368368
uintptr_t v = (uintptr_t)(void*)(a->m_ml);

src/PythonQtSlot.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -756,20 +756,19 @@ meth_compare(PythonQtSlotFunctionObject *a, PythonQtSlotFunctionObject *b)
756756
static long
757757
meth_hash(PythonQtSlotFunctionObject *a)
758758
{
759-
long x,y;
759+
long x;
760760
if (a->m_self == nullptr)
761761
x = 0;
762762
else {
763763
x = PyObject_Hash(a->m_self);
764764
if (x == -1)
765765
return -1;
766766
}
767-
y = _Py_HashPointer((void*)(a->m_ml));
768-
#if PY_VERSION_HEX >= 0x30D0000 /* 0x30D0000 == 3.13.0a0 */
769-
y = Py_HashPointer((void*)(a->m_ml)); /* public in 3.13+ */
770-
#elif !defined(Py_LIMITED_API)
771-
/* fallback: use CPython’s private helper (requires full API) */
772-
y = _Py_HashPointer((void*)(a->m_ml));
767+
#if 0 // PY_VERSION_HEX >= 0x30D0000 /* 0x30D0000 == 3.13.0a0 */
768+
// y = Py_HashPointer((void*)(a->m_ml)); /* public in 3.13+ */
769+
// #elif !defined(Py_LIMITED_API)
770+
// /* fallback: use CPython’s private helper (requires full API) */
771+
// y = _Py_HashPointer((void*)(a->m_ml));
773772
#else
774773
/* portable fallback for the limited/stable ABI */
775774
uintptr_t v = (uintptr_t)(void*)(a->m_ml);

0 commit comments

Comments
 (0)