aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/templates/core_common.xml
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/PySide2/templates/core_common.xml')
-rw-r--r--sources/pyside2/PySide2/templates/core_common.xml21
1 files changed, 6 insertions, 15 deletions
diff --git a/sources/pyside2/PySide2/templates/core_common.xml b/sources/pyside2/PySide2/templates/core_common.xml
index 6d02428ad..a7c9eca3d 100644
--- a/sources/pyside2/PySide2/templates/core_common.xml
+++ b/sources/pyside2/PySide2/templates/core_common.xml
@@ -242,8 +242,8 @@
<!-- Helpers for modifying "bool nativeEventFilter(QByteArray, void*, long *result)"
to return a tuple of bool,long -->
<template name="return_native_eventfilter_conversion_variables">
- long resultVar{0};
- long *%out = &amp;resultVar;
+ qintptr resultVar{0};
+ qintptr *%out = &amp;resultVar;
</template>
<template name="return_native_eventfilter_conversion">
%RETURN_TYPE %out = false;
@@ -343,11 +343,7 @@
<template name="checkPyCapsuleOrPyCObject_func">
static bool checkPyCapsuleOrPyCObject(PyObject* pyObj)
{
- #ifdef IS_PY3K
return PyCapsule_CheckExact(pyObj);
- #else
- return PyCObject_Check(pyObj);
- #endif
}
</template>
@@ -377,15 +373,10 @@
</template>
<template name="pydatetime_importandcheck_function">
- #ifdef IS_PY3K
- #define PySideDateTime_IMPORT PyDateTime_IMPORT
- #else
- #define PySideDateTime_IMPORT \
- (PyDateTimeAPI = (PyDateTime_CAPI*) PyCObject_Import((char*)"datetime", \
- (char*)"datetime_CAPI"))
- #endif
- static bool PyDateTime_ImportAndCheck(PyObject *pyIn) {
- if (!PyDateTimeAPI) PySideDateTime_IMPORT;
+ static bool PyDateTime_ImportAndCheck(PyObject *pyIn)
+ {
+ if (!PyDateTimeAPI)
+ PyDateTime_IMPORT;
return $DATETIMETYPE_Check(pyIn);
}
</template>