Merge lp:~ubuntu-branches/ubuntu/natty/gobject-introspection/natty-201101211713 into lp:ubuntu/natty/gobject-introspection

Proposed by James Westby
Status: Merged
Merged at revision: 37
Proposed branch: lp:~ubuntu-branches/ubuntu/natty/gobject-introspection/natty-201101211713
Merge into: lp:ubuntu/natty/gobject-introspection
Diff against target: 292 lines (+281/-0) (has conflicts)
2 files modified
debian/patches/0001-Preserve-the-c-type-of-array-elements.patch (+280/-0)
debian/patches/series (+1/-0)
Conflict adding file debian/patches.  Moved existing file to debian/patches.moved.
To merge this branch: bzr merge lp:~ubuntu-branches/ubuntu/natty/gobject-introspection/natty-201101211713
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+47060@code.launchpad.net

Description of the change

The package history in the archive and the history in the bzr branch differ. As the archive is authoritative the history of lp:ubuntu/natty/gobject-introspection now reflects that and the old bzr branch has been pushed to lp:~ubuntu-branches/ubuntu/natty/gobject-introspection/natty-201101211713. A merge should be performed if necessary.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'debian/patches'
=== renamed directory 'debian/patches' => 'debian/patches.moved'
=== added file 'debian/patches/0001-Preserve-the-c-type-of-array-elements.patch'
--- debian/patches/0001-Preserve-the-c-type-of-array-elements.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/0001-Preserve-the-c-type-of-array-elements.patch 2011-01-21 17:18:31 +0000
@@ -0,0 +1,280 @@
1From 751a9fa80a31c01cd26ff35f0e66f428372ea88b Mon Sep 17 00:00:00 2001
2From: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
3Date: Thu, 20 Jan 2011 16:34:45 +0100
4Subject: [PATCH 1/3] Preserve the c:type of array elements
5
6So the element type has the correct is_pointer flag
7
8https://bugzilla.gnome.org/show_bug.cgi?id=638929
9---
10 giscanner/maintransformer.py | 5 ++-
11 tests/scanner/Annotation-1.0-expected.gir | 14 ++++++------
12 tests/scanner/Foo-1.0-expected.gir | 4 +-
13 tests/scanner/Regress-1.0-expected.gir | 34 ++++++++++++++--------------
14 4 files changed, 29 insertions(+), 28 deletions(-)
15
16diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
17index 8ada929..ee94554 100644
18--- a/giscanner/maintransformer.py
19+++ b/giscanner/maintransformer.py
20@@ -325,8 +325,9 @@ usage is void (*_gtk_reserved1)(void);"""
21 # We're assuming here that Foo* with an (array) annotation
22 # and no (element-type) means array of Foo
23 element_type_node = node.type.clone()
24- # Explicitly erase ctype since it's no longer valid
25- element_type_node.ctype = None
26+ # The element's ctype is the array's dereferenced
27+ if element_type_node.ctype.endswith('*'):
28+ element_type_node.ctype = element_type_node.ctype[:-1]
29
30 if isinstance(node.type, ast.Array):
31 array_type = node.type.array_type
32diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir
33index e47a4b9..e05e61b 100644
34--- a/tests/scanner/Annotation-1.0-expected.gir
35+++ b/tests/scanner/Annotation-1.0-expected.gir
36@@ -147,7 +147,7 @@ and/or use gtk-doc annotations. -->
37 <parameter name="nums" transfer-ownership="none">
38 <doc xml:whitespace="preserve">Sequence of numbers</doc>
39 <array c:type="int*">
40- <type name="gint"/>
41+ <type name="gint" c:type="int"/>
42 </array>
43 </parameter>
44 </parameters>
45@@ -162,7 +162,7 @@ and/or use gtk-doc annotations. -->
46 <parameter name="nums" transfer-ownership="none">
47 <doc xml:whitespace="preserve">Sequence of numbers that are zero-terminated</doc>
48 <array length="1" zero-terminated="0" c:type="int*">
49- <type name="gint"/>
50+ <type name="gint" c:type="int"/>
51 </array>
52 </parameter>
53 <parameter name="n_nums" transfer-ownership="none">
54@@ -181,7 +181,7 @@ and/or use gtk-doc annotations. -->
55 <parameter name="nums" transfer-ownership="none">
56 <doc xml:whitespace="preserve">Sequence of numbers that are zero-terminated</doc>
57 <array length="1" c:type="int*">
58- <type name="gint"/>
59+ <type name="gint" c:type="int"/>
60 </array>
61 </parameter>
62 <parameter name="n_nums" transfer-ownership="none">
63@@ -378,7 +378,7 @@ each string needs to be freed.</doc>
64 transfer-ownership="full">
65 <doc xml:whitespace="preserve">Argument vector</doc>
66 <array length="0" c:type="char***">
67- <type name="utf8"/>
68+ <type name="utf8" c:type="char**"/>
69 </array>
70 </parameter>
71 </parameters>
72@@ -392,7 +392,7 @@ each string needs to be freed.</doc>
73 <parameter name="data" transfer-ownership="none">
74 <doc xml:whitespace="preserve">The data</doc>
75 <array length="1" c:type="guchar*">
76- <type name="guint8"/>
77+ <type name="guint8" c:type="guchar"/>
78 </array>
79 </parameter>
80 <parameter name="length" transfer-ownership="none">
81@@ -687,7 +687,7 @@ detection, and fixing it via annotations.</doc>
82 transfer-ownership="full">
83 <doc xml:whitespace="preserve">The arguments.</doc>
84 <array length="0" c:type="char***">
85- <type name="utf8"/>
86+ <type name="utf8" c:type="char**"/>
87 </array>
88 </parameter>
89 </parameters>
90@@ -790,7 +790,7 @@ detection, and fixing it via annotations.</doc>
91 caller-allocates="0"
92 transfer-ownership="full">
93 <array c:type="char***">
94- <type name="utf8"/>
95+ <type name="utf8" c:type="char**"/>
96 </array>
97 </parameter>
98 </parameters>
99diff --git a/tests/scanner/Foo-1.0-expected.gir b/tests/scanner/Foo-1.0-expected.gir
100index e527cad..fa5ee93 100644
101--- a/tests/scanner/Foo-1.0-expected.gir
102+++ b/tests/scanner/Foo-1.0-expected.gir
103@@ -1085,7 +1085,7 @@ exposed to language bindings.</doc>
104 <parameters>
105 <parameter name="array" transfer-ownership="none">
106 <array c:type="char**">
107- <type name="utf8"/>
108+ <type name="utf8" c:type="char*"/>
109 </array>
110 </parameter>
111 </parameters>
112@@ -1098,7 +1098,7 @@ exposed to language bindings.</doc>
113 <parameters>
114 <parameter name="array" transfer-ownership="none">
115 <array c:type="gchar**">
116- <type name="utf8"/>
117+ <type name="utf8" c:type="gchar*"/>
118 </array>
119 </parameter>
120 </parameters>
121diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
122index 3d4e56f..abf46f1 100644
123--- a/tests/scanner/Regress-1.0-expected.gir
124+++ b/tests/scanner/Regress-1.0-expected.gir
125@@ -1069,7 +1069,7 @@ TpAccount::status-changed</doc>
126 <parameter name="ints" transfer-ownership="none">
127 <doc xml:whitespace="preserve">a list of 5 integers</doc>
128 <array c:type="int*" fixed-size="5">
129- <type name="gint"/>
130+ <type name="gint" c:type="int"/>
131 </array>
132 </parameter>
133 </parameters>
134@@ -1086,7 +1086,7 @@ TpAccount::status-changed</doc>
135 transfer-ownership="full">
136 <doc xml:whitespace="preserve">a list of 5 integers ranging from 0 to 4</doc>
137 <array c:type="int**" fixed-size="5">
138- <type name="gint"/>
139+ <type name="gint" c:type="int*"/>
140 </array>
141 </parameter>
142 </parameters>
143@@ -1096,7 +1096,7 @@ TpAccount::status-changed</doc>
144 <return-value transfer-ownership="full">
145 <doc xml:whitespace="preserve">a list of 5 integers ranging from 0 to 4</doc>
146 <array c:type="int*" fixed-size="5">
147- <type name="gint"/>
148+ <type name="gint" c:type="int"/>
149 </array>
150 </return-value>
151 </function>
152@@ -1112,7 +1112,7 @@ TpAccount::status-changed</doc>
153 <parameter name="ints" transfer-ownership="none">
154 <doc xml:whitespace="preserve">List of ints</doc>
155 <array length="0" c:type="gint16*">
156- <type name="gint16"/>
157+ <type name="gint16" c:type="gint16"/>
158 </array>
159 </parameter>
160 </parameters>
161@@ -1129,7 +1129,7 @@ TpAccount::status-changed</doc>
162 <parameter name="ints" transfer-ownership="none">
163 <doc xml:whitespace="preserve">List of ints</doc>
164 <array length="0" c:type="gint32*">
165- <type name="gint32"/>
166+ <type name="gint32" c:type="gint32"/>
167 </array>
168 </parameter>
169 </parameters>
170@@ -1146,7 +1146,7 @@ TpAccount::status-changed</doc>
171 <parameter name="ints" transfer-ownership="none">
172 <doc xml:whitespace="preserve">List of ints</doc>
173 <array length="0" c:type="gint64*">
174- <type name="gint64"/>
175+ <type name="gint64" c:type="gint64"/>
176 </array>
177 </parameter>
178 </parameters>
179@@ -1163,7 +1163,7 @@ TpAccount::status-changed</doc>
180 <parameter name="ints" transfer-ownership="none">
181 <doc xml:whitespace="preserve">List of ints</doc>
182 <array length="0" c:type="gint8*">
183- <type name="gint8"/>
184+ <type name="gint8" c:type="gint8"/>
185 </array>
186 </parameter>
187 </parameters>
188@@ -1181,7 +1181,7 @@ TpAccount::status-changed</doc>
189 <parameter name="types" transfer-ownership="none">
190 <doc xml:whitespace="preserve">List of types</doc>
191 <array length="0" c:type="GType*">
192- <type name="GType"/>
193+ <type name="GType" c:type="GType"/>
194 </array>
195 </parameter>
196 </parameters>
197@@ -1191,7 +1191,7 @@ TpAccount::status-changed</doc>
198 <return-value transfer-ownership="full">
199 <doc xml:whitespace="preserve">a new array of integers.</doc>
200 <array length="0" c:type="int*">
201- <type name="gint"/>
202+ <type name="gint" c:type="int"/>
203 </array>
204 </return-value>
205 <parameters>
206@@ -1216,7 +1216,7 @@ TpAccount::status-changed</doc>
207 <parameter name="ints" transfer-ownership="none">
208 <doc xml:whitespace="preserve">List of ints</doc>
209 <array length="0" c:type="int*">
210- <type name="gint"/>
211+ <type name="gint" c:type="int"/>
212 </array>
213 </parameter>
214 </parameters>
215@@ -1240,7 +1240,7 @@ TpAccount::status-changed</doc>
216 transfer-ownership="full">
217 <doc xml:whitespace="preserve">a list of integers whose items will be increased by 1, except the first that will be dropped</doc>
218 <array length="0" c:type="int**">
219- <type name="gint"/>
220+ <type name="gint" c:type="int*"/>
221 </array>
222 </parameter>
223 </parameters>
224@@ -1250,7 +1250,7 @@ TpAccount::status-changed</doc>
225 <return-value transfer-ownership="none">
226 <doc xml:whitespace="preserve">a static array of integers.</doc>
227 <array length="0" c:type="int*">
228- <type name="gint"/>
229+ <type name="gint" c:type="int"/>
230 </array>
231 </return-value>
232 <parameters>
233@@ -1271,7 +1271,7 @@ TpAccount::status-changed</doc>
234 <parameters>
235 <parameter name="arr" transfer-ownership="none" allow-none="1">
236 <array length="1" c:type="int*">
237- <type name="gint"/>
238+ <type name="gint" c:type="int"/>
239 </array>
240 </parameter>
241 <parameter name="len" transfer-ownership="none">
242@@ -1292,7 +1292,7 @@ TpAccount::status-changed</doc>
243 transfer-ownership="full"
244 allow-none="1">
245 <array length="1" c:type="int**">
246- <type name="gint"/>
247+ <type name="gint" c:type="int*"/>
248 </array>
249 </parameter>
250 <parameter name="len"
251@@ -1323,7 +1323,7 @@ TpAccount::status-changed</doc>
252 transfer-ownership="full">
253 <doc xml:whitespace="preserve">a list of 5 integers, from 0 to 4 in consecutive order</doc>
254 <array length="0" c:type="int**">
255- <type name="gint"/>
256+ <type name="gint" c:type="int*"/>
257 </array>
258 </parameter>
259 </parameters>
260@@ -2084,7 +2084,7 @@ call and can be released on return.</doc>
261 <parameters>
262 <parameter name="arr" transfer-ownership="none">
263 <array c:type="char**">
264- <type name="utf8"/>
265+ <type name="utf8" c:type="char*"/>
266 </array>
267 </parameter>
268 </parameters>
269@@ -2127,7 +2127,7 @@ call and can be released on return.</doc>
270 caller-allocates="0"
271 transfer-ownership="container">
272 <array c:type="char***">
273- <type name="utf8"/>
274+ <type name="utf8" c:type="char**"/>
275 </array>
276 </parameter>
277 </parameters>
278--
2791.7.2.3
280
0281
=== added file 'debian/patches/series'
--- debian/patches/series 1970-01-01 00:00:00 +0000
+++ debian/patches/series 2011-01-21 17:18:31 +0000
@@ -0,0 +1,1 @@
10001-Preserve-the-c-type-of-array-elements.patch

Subscribers

People subscribed via source and target branches

to all changes: