summaryrefslogtreecommitdiffstats
path: root/kde/kdebindings/kdebindings4.5.4-sip.patch
blob: cc06db01b3fe7e1a55f7434305ff994c40ca4f77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
--- /tmp/work/src/kdebindings-4.5.4/python/pykde4/sip/kdecore/typedefs.sip	2010-11-02 13:51:10.000000000 +0100
+++ /tmp/work/src/kdebindings-4.5.4/python/pykde4/sip/kdecore/typedefs.sip.new	2011-01-03 12:45:29.000000000 +0100
@@ -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>
 {
@@ -732,62 +648,6 @@
 %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
-};
-
-
 template <TYPE*>
 %MappedType QStack<TYPE*>
 {