summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2016-02-09 12:55:24 +0100
committerMichael Stahl <mstahl@redhat.com>2016-02-09 12:45:36 +0000
commit15d65d2d5403e471af9ad17056784a077a83beee (patch)
tree663bd5828d88a4b678e6fd52f57072269f6be78a /pyuno
parentbf546575116f7f67fe12a735bf8c8689a65bfdc1 (diff)
pyuno: Fix build with python 2.7
Adjust conditionals to properly respect python 2.7.1+ Change-Id: I32d21a071e054100294e418af5358305eac69944 Reviewed-on: https://gerrit.libreoffice.org/22230 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/pyuno.cxx2
-rw-r--r--pyuno/source/module/pyuno_impl.hxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index 1f11f3db78a8..eba4f4458efc 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -325,7 +325,7 @@ sal_Int32 lcl_PyNumber_AsSal_Int32( PyObject *pObj )
// Convert Python number to platform long, then check actual value against
// bounds of sal_Int32
-#if PY_VERSION_HEX >= 0x02070000
+#if PY_VERSION_HEX >= 0x03020000
int nOverflow;
long nResult = PyLong_AsLongAndOverflow( pObj, &nOverflow );
if ( nOverflow || nResult > SAL_MAX_INT32 || nResult < SAL_MIN_INT32) {
diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx
index 39a0952361d9..69e254ce0b9a 100644
--- a/pyuno/source/module/pyuno_impl.hxx
+++ b/pyuno/source/module/pyuno_impl.hxx
@@ -26,7 +26,7 @@
#include <Python.h>
-#if PY_VERSION_HEX < 0x02070000
+#if PY_VERSION_HEX < 0x03020000
typedef long Py_hash_t;
#endif