aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-10-01 13:11:24 +0200
committerChristian Tismer <tismer@stackless.com>2021-10-01 13:41:41 +0200
commit4f872c004b6be356372d057705f44b888e2f968d (patch)
treeef0c257e823d7d1b49ab557693efe9baf5a831f5 /sources
parent0331cadf31cbb7d32ab8e094c00c745a644b76fe (diff)
pep386impl: fix a left-over from the Python 2 cleanup, take 2
Forgot to remove some more stuff. Task-number: PYSIDE-535 Change-Id: Ib3117c1242a7e0007806ff468cbd52f0e640ec79 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources')
-rw-r--r--sources/shiboken6/libshiboken/pep384impl.cpp32
-rw-r--r--sources/shiboken6/libshiboken/pep384impl_doc.rst7
2 files changed, 0 insertions, 39 deletions
diff --git a/sources/shiboken6/libshiboken/pep384impl.cpp b/sources/shiboken6/libshiboken/pep384impl.cpp
index d9b7bd4fb..fd862b7b0 100644
--- a/sources/shiboken6/libshiboken/pep384impl.cpp
+++ b/sources/shiboken6/libshiboken/pep384impl.cpp
@@ -416,38 +416,6 @@ const char *_PepUnicode_AsString(PyObject *str)
/*****************************************************************************
*
- * Support for longobject.h
- *
- */
-#if defined(Py_LIMITED_API) || defined(PYPY_VERSION)
-
-/*
- * This is the original Python function _PyLong_AsInt() from longobject.c .
- * We define it here because we are not allowed to use the function
- * from Python with an underscore.
- */
-
-/* Get a C int from an int object or any object that has an __int__
- method. Return -1 and set an error if overflow occurs. */
-
-int
-_PepLong_AsInt(PyObject *obj)
-{
- int overflow;
- long result = PyLong_AsLongAndOverflow(obj, &overflow);
- if (overflow || result > INT_MAX || result < INT_MIN) {
- /* XXX: could be cute and give a different
- message for overflow == -1 */
- PyErr_SetString(PyExc_OverflowError,
- "Python int too large to convert to C int");
- return -1;
- }
- return int(result);
-}
-#endif // defined(Py_LIMITED_API) || defined(PYPY_VERSION)
-
-/*****************************************************************************
- *
* Support for pydebug.h
*
*/
diff --git a/sources/shiboken6/libshiboken/pep384impl_doc.rst b/sources/shiboken6/libshiboken/pep384impl_doc.rst
index 4e50d68e1..9ee74a26c 100644
--- a/sources/shiboken6/libshiboken/pep384impl_doc.rst
+++ b/sources/shiboken6/libshiboken/pep384impl_doc.rst
@@ -53,13 +53,6 @@ It is questionable if it is worthwhile to continue using the buffer protocol
or if we should try to get rid of ``Pep_buffer``, completely.
-longobject.h
-------------
-
-``_PyLong_AsInt`` is not available. We defined a ``_PepLong_AsInt`` function, instead.
-Maybe this should be replaced by ``PyLong_AsLong``.
-
-
pydebug.h
---------