From 8ed37563888f7956da99636c62f18459729d5966 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Wed, 2 May 2018 15:51:05 +0200 Subject: Use PyLong instead of PyInt for QVariant Python 3 uses PyLong for integer manipulation, and since it is a valid type in Python 2 we can use it instead to have better compatibility, and avoid integer overflows. We keep the PyInt entry to avoid breaking other sections of the code when this type is required. Added a couple of PyInt_* alias to use PyLong_* ones instead. Task-number: PYSIDE-648 Change-Id: Id6af66050c5ab81fc51c1c07b1c9422a954b81c0 Reviewed-by: Alexandru Croitor Reviewed-by: Friedemann Kleint Reviewed-by: Christian Tismer --- sources/shiboken2/libshiboken/sbkpython.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sources/shiboken2/libshiboken/sbkpython.h') diff --git a/sources/shiboken2/libshiboken/sbkpython.h b/sources/shiboken2/libshiboken/sbkpython.h index 57828f624..6d90f4086 100644 --- a/sources/shiboken2/libshiboken/sbkpython.h +++ b/sources/shiboken2/libshiboken/sbkpython.h @@ -48,6 +48,10 @@ #define PyInt_Type PyLong_Type #define PyInt_Check PyLong_Check + #define PyInt_CheckExact PyLong_CheckExact + #define PyInt_FromString PyLong_FromString + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsUnsignedLongLongMask PyLong_AsLongLong #define PyInt_FromLong PyLong_FromLong -- cgit v1.2.3