diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2016-02-09 12:55:24 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-02-09 12:45:25 +0000 |
commit | e14bd2d6845cf13a35b14762d6e1e160e8315997 (patch) | |
tree | 512b636b1affa911ddb31e3a5ecb252a9780de6d /pyuno | |
parent | xmlsecurity: OOXML export of idSignedProperties stub (diff) | |
download | core-e14bd2d6845cf13a35b14762d6e1e160e8315997.tar.gz core-e14bd2d6845cf13a35b14762d6e1e160e8315997.zip |
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/22231
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.cxx | 2 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_impl.hxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index d69f195268cd..8b44c6445eaf 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -324,7 +324,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 |