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

Subscribers

People subscribed via source and target branches

to all changes: