[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - pyuno/source
Rico Tzschichholz
ricotz at ubuntu.com
Tue Feb 9 12:45:48 UTC 2016
pyuno/source/module/pyuno.cxx | 2 +-
pyuno/source/module/pyuno_impl.hxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 15d65d2d5403e471af9ad17056784a077a83beee
Author: Rico Tzschichholz <ricotz at ubuntu.com>
Date: Tue Feb 9 12:55:24 2016 +0100
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 at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index 1f11f3d..eba4f44 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 39a0952..69e254c 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
More information about the Libreoffice-commits
mailing list