[packages/python-PyKDE4] - Patch wich allows package to build using python 4.14 with API v9.0.

lmasko lmasko at pld-linux.org
Fri Nov 16 16:15:03 CET 2012


commit da826e461e58848a3c9066c50767c879f80c7a12
Author: Lukasz Masko <lmasko at pld-linux.org>
Date:   Fri Nov 16 15:37:21 2012 +0100

    - Patch wich allows package to build using python 4.14 with API v9.0.

 python-PyKDE4-typedefs.patch | 80 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)
---
diff --git a/python-PyKDE4-typedefs.patch b/python-PyKDE4-typedefs.patch
new file mode 100644
index 0000000..2c8f9ab
--- /dev/null
+++ b/python-PyKDE4-typedefs.patch
@@ -0,0 +1,80 @@
+--- pykde4-4.9.2/sip/kdecore/typedefs.sip~	2012-09-28 02:18:24.000000000 +0200
++++ pykde4-4.9.2/sip/kdecore/typedefs.sip	2012-11-16 14:14:42.000000000 +0100
+@@ -951,77 +951,3 @@
+ %End
+ };
+ 
+-%MappedType QVector<int>
+-{
+-%TypeHeaderCode
+-#include <qvector.h>
+-%End
+-
+-%ConvertFromTypeCode
+-    // Create the list.
+-    PyObject *l;
+-
+-    if ((l = PyList_New(sipCpp->size())) == NULL)
+-        return NULL;
+-
+-    // Set the list elements.
+-    for (int i = 0; i < sipCpp->size(); ++i)
+-    {
+-        int t = (sipCpp->at(i));
+-
+-#if PY_MAJOR_VERSION >= 3        
+-        PyObject *tobj = PyLong_FromLong(t);
+-#else
+-        PyObject *tobj = PyInt_FromLong(t);
+-#endif
+-
+-        PyList_SET_ITEM(l, i, tobj);
+-    }
+-
+-    return l;
+-%End
+-
+-%ConvertToTypeCode
+-    // Check the type if that is all that is required.
+-    if (sipIsErr == NULL)
+-    {
+-        if (!PyList_Check(sipPy))
+-            return 0;
+-
+-        for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) {
+-            PyObject *tobj = PyList_GET_ITEM(sipPy, i);
+-#if PY_MAJOR_VERSION >= 3
+-            if (!PyNumber_Check(tobj))
+-#else
+-            if (!PyInt_Check(tobj))
+-#endif
+-                return 0;
+-        }
+-        return 1;
+-    }
+-
+-    QVector<int> *qv = new QVector<int>;
+- 
+-    for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+-    {
+-        PyObject *tobj = PyList_GET_ITEM(sipPy, i);
+- #if PY_MAJOR_VERSION >= 3
+-        int t = PyLong_AsLong (tobj);
+-#else
+-        int t = PyInt_AS_LONG (tobj);
+-#endif
+-
+-        if (*sipIsErr)
+-        {
+-            delete qv;
+-            return 0;
+-        }
+-
+-        qv->append(t);
+-    }
+- 
+-    *sipCppPtr = qv;
+- 
+-    return sipGetState(sipTransferObj);
+-%End
+-};
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-PyKDE4.git/commitdiff/da826e461e58848a3c9066c50767c879f80c7a12



More information about the pld-cvs-commit mailing list