[Libreoffice-commits] core.git: pyuno/source
Matthew J. Francis
mjay.francis at gmail.com
Tue Jun 30 21:19:15 PDT 2015
pyuno/source/module/pyuno.cxx | 8 +++++++-
pyuno/source/module/pyuno_impl.hxx | 7 -------
2 files changed, 7 insertions(+), 8 deletions(-)
New commits:
commit 3a6ec53eeeec71312f5ea890689f9c2ee79c2aac
Author: Matthew J. Francis <mjay.francis at gmail.com>
Date: Tue Jun 30 10:07:23 2015 -0400
Fix compilation with Python 2.7
Change-Id: I0dd118f0215e06fec0cccff9b46d80f13bd802cc
Reviewed-on: https://gerrit.libreoffice.org/16620
Reviewed-by: Matthew Francis <mjay.francis at gmail.com>
Tested-by: Matthew Francis <mjay.francis at gmail.com>
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index 8f7a6a6..413cc20 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -338,7 +338,13 @@ int lcl_PySlice_GetIndicesEx( PyObject *pObject, sal_Int32 nLen, sal_Int32 *nSta
{
Py_ssize_t nStart_ssize, nStop_ssize, nStep_ssize, nSliceLength_ssize;
- int nResult = PySlice_GetIndicesEx( static_cast<PySliceObject_t*>(pObject), nLen, &nStart_ssize, &nStop_ssize, &nStep_ssize, &nSliceLength_ssize );
+ int nResult = PySlice_GetIndicesEx(
+#if PY_VERSION_HEX >= 0x030200f0
+ pObject,
+#else
+ reinterpret_cast<PySliceObject*>(pObject),
+#endif
+ nLen, &nStart_ssize, &nStop_ssize, &nStep_ssize, &nSliceLength_ssize );
if (nResult == -1)
return -1;
diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx
index 5f0df95..11fbfa2 100644
--- a/pyuno/source/module/pyuno_impl.hxx
+++ b/pyuno/source/module/pyuno_impl.hxx
@@ -143,13 +143,6 @@ inline PyObject* PyStrBytes_FromStringAndSize(const char *string, Py_ssize_t len
}
#endif /* PY_MAJOR_VERSION >= 3 */
-// Type of argument to PySlice_GetIndicesEx() changed in Python 3.2
-#if PY_VERSION_HEX >= 0x030200f0
-typedef PyObject PySliceObject_t;
-#else
-typedef PySliceObject PySliceObject_t;
-#endif
-
namespace pyuno
{
More information about the Libreoffice-commits
mailing list