summaryrefslogtreecommitdiff
path: root/kde-base/pykde4/files
diff options
context:
space:
mode:
authorJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>2011-01-08 23:58:21 -0100
committerJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>2011-01-08 23:58:21 -0100
commitdab8afe611fe7d6db96daf77d4e78f45cc44badd (patch)
treec3a2c35db076ae1461b3ee7bdd27e3b535589167 /kde-base/pykde4/files
parent80f20b19d7d6cde0d1ab7e507a3e8a3a950ba9c4 (diff)
downloadkde-dab8afe611fe7d6db96daf77d4e78f45cc44badd.tar.gz
kde-dab8afe611fe7d6db96daf77d4e78f45cc44badd.tar.bz2
kde-dab8afe611fe7d6db96daf77d4e78f45cc44badd.zip
[kde-base/pykde4-4.5.5] Added patch to fix the typedefs build failure - fixes bug 349707.
Thanks to Matt Whitlock for the patch.
Diffstat (limited to 'kde-base/pykde4/files')
-rw-r--r--kde-base/pykde4/files/pykde4-typedefs-fix.patch155
1 files changed, 155 insertions, 0 deletions
diff --git a/kde-base/pykde4/files/pykde4-typedefs-fix.patch b/kde-base/pykde4/files/pykde4-typedefs-fix.patch
new file mode 100644
index 00000000000..6fb5714ad05
--- /dev/null
+++ b/kde-base/pykde4/files/pykde4-typedefs-fix.patch
@@ -0,0 +1,155 @@
+--- pykde4-4.5.5/python/pykde4/sip/kdecore/typedefs.sip~ 2010-11-02 12:51:10.000000000 +0000
++++ pykde4-4.5.5/python/pykde4/sip/kdecore/typedefs.sip 2011-01-08 22:34:29.006096324 +0000
+@@ -582,90 +582,6 @@
+ %End
+ };
+
+-template <TYPE>
+-%MappedType QSet<TYPE>
+-{
+-%TypeHeaderCode
+-#include <qset.h>
+-%End
+-
+-%ConvertFromTypeCode
+- // Create the list.
+- PyObject *l;
+-
+- if ((l = PyList_New(sipCpp->size())) == NULL)
+- return NULL;
+-
+- // Set the list elements.
+- QSet<TYPE> set = *sipCpp;
+- int i = 0;
+- foreach (TYPE value, set)
+- {
+- PyObject *obj = sipConvertFromNewType(&value, sipType_TYPE, sipTransferObj);
+- if (obj == NULL || PyList_SET_ITEM (l, i, obj) < 0)
+- {
+- Py_DECREF(l);
+-
+- if (obj)
+- Py_DECREF(obj);
+-
+- return NULL;
+- }
+-
+- Py_DECREF(obj);
+- i++;
+- }
+-
+- return l;
+-%End
+-
+-%ConvertToTypeCode
+- // Check the type if that is all that is required.
+- if (sipIsErr == NULL)
+- {
+- if (!PyList_Check(sipPy))
+- return 0;
+- }
+-
+- // 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)
+- if (!sipCanConvertToType(PyList_GET_ITEM (sipPy, i), sipType_TYPE, SIP_NOT_NONE))
+- return 0;
+- }
+-
+- QSet<TYPE> *qs = new QSet<TYPE>;
+-
+- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- {
+- int state;
+-
+- TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM (sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+-
+- if (*sipIsErr)
+- {
+- sipReleaseType(t, sipType_TYPE, state);
+-
+- delete qs;
+- return 0;
+- }
+-
+- *qs << *t;
+-
+- sipReleaseType(t, sipType_TYPE, state);
+- }
+-
+- *sipCppPtr = qs;
+-
+- return sipGetState(sipTransferObj);
+-%End
+-};
+-
+-
+ template <TYPE1,TYPE2>
+ %MappedType QPair<TYPE1,TYPE2>
+ {
+@@ -730,61 +646,6 @@
+
+ return sipGetState(sipTransferObj);
+ %End
+-};
+-
+-
+-%MappedType QList<uint>
+-{
+-%TypeHeaderCode
+-#include <qlist.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) {
+- PyObject *pobj;
+-
+-#if PY_MAJOR_VERSION >= 3
+- if ((pobj = PyLong_FromLong(sipCpp->value(i))) == NULL) {
+-#else
+- if ((pobj = PyInt_FromLong(sipCpp->value(i))) == NULL) {
+-#endif
+- Py_DECREF(l);
+-
+- return NULL;
+- }
+-
+- PyList_SET_ITEM(l, i, pobj);
+- }
+-
+- return l;
+-%End
+-
+-%ConvertToTypeCode
+- // Check the type if that is all that is required.
+- if (sipIsErr == NULL)
+- return PyList_Check(sipPy);
+-
+- QList<uint> *ql = new QList<uint>;
+-
+- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) {
+-#if PY_MAJOR_VERSION >= 3
+- ql->append(PyLong_AsLong(PyList_GET_ITEM(sipPy, i)));
+-#else
+- ql->append(PyInt_AsLong(PyList_GET_ITEM(sipPy, i)));
+-#endif
+- }
+-
+- *sipCppPtr = ql;
+-
+- return sipGetState(sipTransferObj);
+-%End
+ };
+
+