gobject-introspection 2.2.0-x86-mingw32 → 2.2.1-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +7 -7
  3. data/ext/gobject-introspection/rb-gi-argument.c +28 -3
  4. data/ext/gobject-introspection/rb-gi-constructor-info.c +6 -1
  5. data/ext/gobject-introspection/rb-gi-function-info.c +29 -4
  6. data/ext/gobject-introspection/rb-gi-loader.c +19 -3
  7. data/ext/gobject-introspection/rb-gi-struct-info.c +28 -16
  8. data/lib/2.0/gobject_introspection.so +0 -0
  9. data/lib/gobject-introspection/callable-info.rb +16 -7
  10. data/lib/gobject-introspection/loader.rb +47 -19
  11. data/test/test-object-info.rb +1 -1
  12. data/test/test-signal-info.rb +2 -2
  13. data/test/test-struct-info.rb +1 -1
  14. data/vendor/local/bin/g-ir-compiler.exe +0 -0
  15. data/vendor/local/bin/g-ir-generate.exe +0 -0
  16. data/vendor/local/bin/libgirepository-1.0-1.dll +0 -0
  17. data/vendor/local/include/gobject-introspection-1.0/giarginfo.h +30 -0
  18. data/vendor/local/include/gobject-introspection-1.0/gibaseinfo.h +31 -0
  19. data/vendor/local/include/gobject-introspection-1.0/gicallableinfo.h +36 -0
  20. data/vendor/local/include/gobject-introspection-1.0/giconstantinfo.h +12 -0
  21. data/vendor/local/include/gobject-introspection-1.0/gienuminfo.h +26 -0
  22. data/vendor/local/include/gobject-introspection-1.0/gifieldinfo.h +19 -0
  23. data/vendor/local/include/gobject-introspection-1.0/gifunctioninfo.h +23 -0
  24. data/vendor/local/include/gobject-introspection-1.0/giinterfaceinfo.h +38 -0
  25. data/vendor/local/include/gobject-introspection-1.0/giobjectinfo.h +72 -2
  26. data/vendor/local/include/gobject-introspection-1.0/gipropertyinfo.h +12 -0
  27. data/vendor/local/include/gobject-introspection-1.0/giregisteredtypeinfo.h +11 -0
  28. data/vendor/local/include/gobject-introspection-1.0/girepository.h +68 -8
  29. data/vendor/local/include/gobject-introspection-1.0/girffi.h +25 -1
  30. data/vendor/local/include/gobject-introspection-1.0/gisignalinfo.h +12 -0
  31. data/vendor/local/include/gobject-introspection-1.0/gistructinfo.h +24 -0
  32. data/vendor/local/include/gobject-introspection-1.0/gitypeinfo.h +31 -0
  33. data/vendor/local/include/gobject-introspection-1.0/gitypelib.h +25 -0
  34. data/vendor/local/include/gobject-introspection-1.0/gitypes.h +84 -13
  35. data/vendor/local/include/gobject-introspection-1.0/giunioninfo.h +27 -0
  36. data/vendor/local/include/gobject-introspection-1.0/giversionmacros.h +128 -0
  37. data/vendor/local/include/gobject-introspection-1.0/givfuncinfo.h +17 -0
  38. data/vendor/local/lib/girepository-1.0/GIRepository-2.0.typelib +0 -0
  39. data/vendor/local/lib/girepository-1.0/GLib-2.0.typelib +0 -0
  40. data/vendor/local/lib/girepository-1.0/GObject-2.0.typelib +0 -0
  41. data/vendor/local/lib/girepository-1.0/Gio-2.0.typelib +0 -0
  42. data/vendor/local/lib/girepository-1.0/libxml2-2.0.typelib +0 -0
  43. data/vendor/local/lib/girepository-1.0/win32-1.0.typelib +0 -0
  44. data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyc +0 -0
  45. data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyo +0 -0
  46. data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.py +5 -4
  47. data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyc +0 -0
  48. data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyo +0 -0
  49. data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.py +1865 -913
  50. data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyc +0 -0
  51. data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyo +0 -0
  52. data/vendor/local/lib/gobject-introspection/giscanner/ast.py +49 -16
  53. data/vendor/local/lib/gobject-introspection/giscanner/ast.pyc +0 -0
  54. data/vendor/local/lib/gobject-introspection/giscanner/ast.pyo +0 -0
  55. data/vendor/local/lib/gobject-introspection/giscanner/cachestore.py +10 -4
  56. data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyc +0 -0
  57. data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyo +0 -0
  58. data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.py +202 -0
  59. data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyc +0 -0
  60. data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyo +0 -0
  61. data/vendor/local/lib/gobject-introspection/giscanner/codegen.py +32 -1
  62. data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyc +0 -0
  63. data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyo +0 -0
  64. data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.py +1 -0
  65. data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyc +0 -0
  66. data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyo +0 -0
  67. data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.py +305 -0
  68. data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.pyc +0 -0
  69. data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.pyo +0 -0
  70. data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyc +0 -0
  71. data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyo +0 -0
  72. data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyc +0 -0
  73. data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyo +0 -0
  74. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/callback.tmpl +4 -0
  75. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/field.tmpl +1 -0
  76. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/function.tmpl +8 -9
  77. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/interface.tmpl +2 -0
  78. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/callback.tmpl +27 -0
  79. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/class.tmpl +17 -5
  80. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/enum.tmpl +8 -0
  81. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/field.tmpl +9 -0
  82. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/function.tmpl +12 -13
  83. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/interface.tmpl +17 -0
  84. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/property.tmpl +3 -4
  85. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/signal.tmpl +10 -9
  86. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/vfunc.tmpl +7 -7
  87. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/callback.tmpl +27 -0
  88. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/class.tmpl +5 -4
  89. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/field.tmpl +1 -0
  90. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/function.tmpl +8 -14
  91. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/interface.tmpl +16 -0
  92. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/property.tmpl +2 -3
  93. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/signal.tmpl +6 -7
  94. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/vfunc.tmpl +7 -13
  95. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/base.tmpl +10 -19
  96. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/class.tmpl +24 -3
  97. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/namespace.tmpl +4 -7
  98. data/vendor/local/lib/gobject-introspection/giscanner/docwriter.py +375 -61
  99. data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyc +0 -0
  100. data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyo +0 -0
  101. data/vendor/local/lib/gobject-introspection/giscanner/dumper.py +43 -75
  102. data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyc +0 -0
  103. data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyo +0 -0
  104. data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.py +1 -20
  105. data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyc +0 -0
  106. data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyo +0 -0
  107. data/vendor/local/lib/gobject-introspection/giscanner/girparser.py +33 -15
  108. data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyc +0 -0
  109. data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyo +0 -0
  110. data/vendor/local/lib/gobject-introspection/giscanner/girwriter.py +51 -22
  111. data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyc +0 -0
  112. data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyo +0 -0
  113. data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyc +0 -0
  114. data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyo +0 -0
  115. data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyc +0 -0
  116. data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyo +0 -0
  117. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.py +285 -254
  118. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyc +0 -0
  119. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyo +0 -0
  120. data/vendor/local/lib/gobject-introspection/giscanner/message.py +41 -25
  121. data/vendor/local/lib/gobject-introspection/giscanner/message.pyc +0 -0
  122. data/vendor/local/lib/gobject-introspection/giscanner/message.pyo +0 -0
  123. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.py +67 -15
  124. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyc +0 -0
  125. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyo +0 -0
  126. data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyc +0 -0
  127. data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyo +0 -0
  128. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.py +10 -6
  129. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyc +0 -0
  130. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyo +0 -0
  131. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.py +14 -8
  132. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyc +0 -0
  133. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyo +0 -0
  134. data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.py +16 -2
  135. data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyc +0 -0
  136. data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyo +0 -0
  137. data/vendor/local/lib/gobject-introspection/giscanner/transformer.py +150 -169
  138. data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyc +0 -0
  139. data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyo +0 -0
  140. data/vendor/local/lib/gobject-introspection/giscanner/utils.py +64 -3
  141. data/vendor/local/lib/gobject-introspection/giscanner/utils.pyc +0 -0
  142. data/vendor/local/lib/gobject-introspection/giscanner/utils.pyo +0 -0
  143. data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.py +5 -44
  144. data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyc +0 -0
  145. data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyo +0 -0
  146. data/vendor/local/lib/libgirepository-1.0.a +0 -0
  147. data/vendor/local/lib/libgirepository-1.0.dll.a +0 -0
  148. data/vendor/local/lib/libgirepository-1.0.la +1 -1
  149. data/vendor/local/lib/pkgconfig/gobject-introspection-1.0.pc +4 -4
  150. data/vendor/local/lib/pkgconfig/gobject-introspection-no-export-1.0.pc +5 -5
  151. data/vendor/local/share/gir-1.0/GIRepository-2.0.gir +352 -143
  152. data/vendor/local/share/gir-1.0/GLib-2.0.gir +6402 -3872
  153. data/vendor/local/share/gir-1.0/GModule-2.0.gir +42 -24
  154. data/vendor/local/share/gir-1.0/GObject-2.0.gir +1543 -887
  155. data/vendor/local/share/gir-1.0/Gio-2.0.gir +10859 -3705
  156. data/vendor/local/share/gobject-introspection-1.0/tests/annotation.c +10 -14
  157. data/vendor/local/share/gobject-introspection-1.0/tests/annotation.h +112 -9
  158. data/vendor/local/share/gobject-introspection-1.0/tests/drawable.c +2 -0
  159. data/vendor/local/share/gobject-introspection-1.0/tests/drawable.h +11 -0
  160. data/vendor/local/share/gobject-introspection-1.0/tests/everything.c +106 -0
  161. data/vendor/local/share/gobject-introspection-1.0/tests/everything.h +107 -0
  162. data/vendor/local/share/gobject-introspection-1.0/tests/foo.c +3 -3
  163. data/vendor/local/share/gobject-introspection-1.0/tests/foo.h +145 -0
  164. data/vendor/local/share/gobject-introspection-1.0/tests/gimarshallingtests.c +166 -10
  165. data/vendor/local/share/gobject-introspection-1.0/tests/gimarshallingtests.h +790 -0
  166. data/vendor/local/share/gobject-introspection-1.0/tests/gitestmacros.h +10 -0
  167. data/vendor/local/share/gobject-introspection-1.0/tests/regress.c +79 -28
  168. data/vendor/local/share/gobject-introspection-1.0/tests/regress.h +462 -0
  169. data/vendor/local/share/gobject-introspection-1.0/tests/utility.c +2 -0
  170. data/vendor/local/share/gobject-introspection-1.0/tests/utility.h +7 -0
  171. data/vendor/local/share/gobject-introspection-1.0/tests/warnlib.c +14 -0
  172. data/vendor/local/share/gobject-introspection-1.0/tests/warnlib.h +10 -0
  173. data/vendor/local/share/man/man1/g-ir-compiler.1 +1 -10
  174. metadata +38 -23
  175. data/lib/1.9/gobject_introspection.so +0 -0
  176. data/lib/2.1/gobject_introspection.so +0 -0
@@ -3,6 +3,8 @@
3
3
 
4
4
  #include <glib-object.h>
5
5
  #include <gio/gio.h> /* GAsyncReadyCallback */
6
+
7
+ #include "gitestmacros.h"
6
8
  #include "utility.h"
7
9
 
8
10
  #define REGRESS_FOO_SUCCESS_INT 0x1138
@@ -58,10 +60,16 @@ struct _RegressFooInterfaceIface
58
60
  void (*do_regress_foo) (RegressFooInterface *self, int x);
59
61
  };
60
62
 
63
+
64
+ _GI_TEST_EXTERN
61
65
  GType regress_foo_interface_get_type (void) G_GNUC_CONST;
62
66
 
67
+
68
+ _GI_TEST_EXTERN
63
69
  void regress_foo_interface_do_regress_foo (RegressFooInterface *iface, int x);
64
70
 
71
+
72
+ _GI_TEST_EXTERN
65
73
  void regress_foo_interface_static_method (int x);
66
74
 
67
75
  struct _RegressFooSubInterfaceIface
@@ -79,9 +87,15 @@ struct _RegressFooSubInterfaceIface
79
87
  void (*do_baz) (RegressFooSubInterface *self, GCallback callback, gpointer user_data);
80
88
  };
81
89
 
90
+
91
+ _GI_TEST_EXTERN
82
92
  GType regress_foo_sub_interface_get_type (void) G_GNUC_CONST;
83
93
 
94
+
95
+ _GI_TEST_EXTERN
84
96
  void regress_foo_sub_interface_do_bar (RegressFooSubInterface *self);
97
+
98
+ _GI_TEST_EXTERN
85
99
  void regress_foo_sub_interface_do_baz (RegressFooSubInterface *self,
86
100
  GCallback callback,
87
101
  gpointer user_data);
@@ -106,35 +120,67 @@ struct _RegressFooObjectClass
106
120
  GCallback _reserved[4];
107
121
  };
108
122
 
123
+
124
+ _GI_TEST_EXTERN
109
125
  gint regress_foo_init (void);
110
126
 
127
+
128
+ _GI_TEST_EXTERN
111
129
  GType regress_foo_object_get_type (void) G_GNUC_CONST;
130
+
131
+ _GI_TEST_EXTERN
112
132
  RegressFooObject* regress_foo_object_new (void);
133
+
134
+ _GI_TEST_EXTERN
113
135
  UtilityObject* regress_foo_object_external_type (RegressFooObject *object);
136
+
137
+ _GI_TEST_EXTERN
114
138
  GObject* regress_foo_object_new_as_super (void);
115
139
 
140
+
141
+ _GI_TEST_EXTERN
116
142
  void regress_foo_object_various (RegressFooObject *object, void *data, GType some_type);
117
143
 
144
+
145
+ _GI_TEST_EXTERN
118
146
  void regress_foo_object_take_all (RegressFooObject *object, int x, ...);
119
147
 
120
148
  typedef gpointer RegressFooObjectCookie;
121
149
 
150
+
151
+ _GI_TEST_EXTERN
122
152
  RegressFooObjectCookie regress_foo_object_new_cookie (RegressFooObject *object, const char *target);
123
153
 
154
+
155
+ _GI_TEST_EXTERN
124
156
  void regress_foo_object_is_it_time_yet (RegressFooObject *object, time_t time);
125
157
 
158
+
159
+ _GI_TEST_EXTERN
126
160
  const char * regress_foo_object_get_name (RegressFooObject *object);
127
161
 
162
+
163
+ _GI_TEST_EXTERN
128
164
  char * regress_foo_object_dup_name (RegressFooObject *object);
129
165
 
166
+
167
+ _GI_TEST_EXTERN
130
168
  void regress_foo_object_handle_glyph (RegressFooObject *object, UtilityGlyph glyph);
131
169
 
170
+
171
+ _GI_TEST_EXTERN
132
172
  gboolean regress_foo_object_virtual_method (RegressFooObject *object, int first_param);
133
173
 
174
+
175
+ _GI_TEST_EXTERN
134
176
  void regress_foo_object_read (RegressFooObject *object, int offset, int length);
135
177
 
178
+
179
+ _GI_TEST_EXTERN
136
180
  int regress_foo_object_static_meth (void);
137
181
 
182
+
183
+ _GI_TEST_EXTERN
138
184
  void regress_foo_object_skipped_method (RegressFooObject *object);
139
185
 
140
186
  struct _RegressFooSubobject
@@ -147,17 +193,31 @@ struct _RegressFooSubobjectClass
147
193
  RegressFooObjectClass parent_class;
148
194
  };
149
195
 
196
+
197
+ _GI_TEST_EXTERN
150
198
  GType regress_foo_subobject_get_type (void) G_GNUC_CONST;
199
+
200
+ _GI_TEST_EXTERN
151
201
  RegressFooSubobject* regress_foo_subobject_new (void);
152
202
 
203
+
204
+ _GI_TEST_EXTERN
153
205
  RegressFooObject * regress_foo_object_get_default (void);
154
206
 
207
+
208
+ _GI_TEST_EXTERN
155
209
  GType regress_foo_buffer_get_type (void);
156
210
 
211
+
212
+ _GI_TEST_EXTERN
157
213
  void regress_foo_buffer_some_method (RegressFooBuffer *buffer);
158
214
 
215
+
216
+ _GI_TEST_EXTERN
159
217
  GType regress_foo_other_object_get_type (void) G_GNUC_CONST;
160
218
 
219
+
220
+ _GI_TEST_EXTERN
161
221
  RegressFooObject * regress_foo_not_a_constructor_new (void);
162
222
 
163
223
  typedef enum
@@ -167,10 +227,16 @@ typedef enum
167
227
  REGRESS_FOO_ENUM_DELTA
168
228
  } RegressFooEnumType;
169
229
 
230
+
231
+ _GI_TEST_EXTERN
170
232
  GType regress_foo_enum_type_get_type (void);
171
233
 
234
+
235
+ _GI_TEST_EXTERN
172
236
  int regress_foo_enum_type_method (RegressFooEnumType regress_foo_enum);
173
237
 
238
+
239
+ _GI_TEST_EXTERN
174
240
  RegressFooEnumType regress_foo_enum_type_returnv (int x);
175
241
 
176
242
  typedef enum
@@ -180,6 +246,8 @@ typedef enum
180
246
  REGRESS_FOO_FLAGS_THIRD = 1 << 2
181
247
  } RegressFooFlagsType;
182
248
 
249
+
250
+ _GI_TEST_EXTERN
183
251
  GType regress_foo_flags_type_get_type (void);
184
252
 
185
253
  typedef enum
@@ -213,18 +281,34 @@ typedef enum
213
281
 
214
282
  typedef struct _RegressFooBoxed RegressFooBoxed;
215
283
 
284
+
285
+ _GI_TEST_EXTERN
216
286
  GType regress_foo_boxed_get_type (void) G_GNUC_CONST;
287
+
288
+ _GI_TEST_EXTERN
217
289
  RegressFooBoxed* regress_foo_boxed_new (void);
290
+
291
+ _GI_TEST_EXTERN
218
292
  void regress_foo_boxed_method (RegressFooBoxed* boxed);
219
293
 
220
294
  /* This one tests capitalization handling with respect to DBus */
221
295
  typedef struct _RegressFooDBusData RegressFooDBusData;
296
+
297
+ _GI_TEST_EXTERN
222
298
  GType regress_foo_dbus_data_get_type (void) G_GNUC_CONST;
299
+
300
+ _GI_TEST_EXTERN
223
301
  void regress_foo_dbus_data_method (RegressFooDBusData* dbusdata);
224
302
 
225
303
  /* FIXME: Scanner does not support this yet
304
+
305
+ _GI_TEST_EXTERN
226
306
  const char *REGRESS_FOO_CONSTANT_STR = "regress_foo-constant-str";
307
+
308
+ _GI_TEST_EXTERN
227
309
  const int REGRESS_FOO_CONSTANT_INT = 10;
310
+
311
+ _GI_TEST_EXTERN
228
312
  const float REGRESS_FOO_CONSTANT_FLOAT = 10;
229
313
  */
230
314
 
@@ -255,14 +339,20 @@ struct _RegressFooRectangle
255
339
  gint height;
256
340
  };
257
341
 
342
+
343
+ _GI_TEST_EXTERN
258
344
  void
259
345
  regress_foo_method_external_references (UtilityObject *object,
260
346
  UtilityEnumType e,
261
347
  UtilityFlagType f,
262
348
  UtilityStruct s);
263
349
 
350
+
351
+ _GI_TEST_EXTERN
264
352
  void regress_foo_rectangle_add(RegressFooRectangle *r1, const RegressFooRectangle *r2);
265
353
 
354
+
355
+ _GI_TEST_EXTERN
266
356
  RegressFooRectangle * regress_foo_rectangle_new (int x, int y, int width, int height);
267
357
 
268
358
 
@@ -301,10 +391,16 @@ struct _RegressFooBRect
301
391
  double y;
302
392
  };
303
393
 
394
+
395
+ _GI_TEST_EXTERN
304
396
  GType regress_foo_brect_get_type (void);
305
397
 
398
+
399
+ _GI_TEST_EXTERN
306
400
  RegressFooBRect *regress_foo_brect_new (double x, double y);
307
401
 
402
+
403
+ _GI_TEST_EXTERN
308
404
  void regress_foo_brect_add (RegressFooBRect *b1, RegressFooBRect *b2);
309
405
 
310
406
  typedef union _RegressFooBUnion RegressFooBUnion;
@@ -338,36 +434,69 @@ struct _RegressFooThingWithArray
338
434
  guchar *data;
339
435
  } ;
340
436
 
437
+
438
+ _GI_TEST_EXTERN
341
439
  RegressFooBUnion *regress_foo_bunion_new (void);
342
440
 
441
+
442
+ _GI_TEST_EXTERN
343
443
  GType regress_foo_bunion_get_type (void);
344
444
 
445
+
446
+ _GI_TEST_EXTERN
345
447
  int regress_foo_bunion_get_contained_type (RegressFooBUnion *bunion);
346
448
 
449
+
450
+ _GI_TEST_EXTERN
347
451
  void regress_foo_test_unsigned_qualifier (unsigned int unsigned_param);
452
+
453
+ _GI_TEST_EXTERN
348
454
  void regress_foo_test_unsigned_type (unsigned unsigned_param);
349
455
 
456
+
457
+ _GI_TEST_EXTERN
350
458
  void regress_foo_test_string_array (char **array);
351
459
 
460
+
461
+ _GI_TEST_EXTERN
352
462
  void regress_foo_test_string_array_with_g (gchar **array);
353
463
 
464
+
465
+ _GI_TEST_EXTERN
354
466
  GArray *regress_foo_test_array (void);
355
467
 
468
+
469
+ _GI_TEST_EXTERN
356
470
  const char * regress_foo_test_const_char_retval (void);
471
+
472
+ _GI_TEST_EXTERN
357
473
  const RegressFooStruct * regress_foo_test_const_struct_retval (void);
474
+
475
+ _GI_TEST_EXTERN
358
476
  void regress_foo_test_const_char_param (const char * param);
477
+
478
+ _GI_TEST_EXTERN
359
479
  void regress_foo_test_const_struct_param (const RegressFooStruct * param);
360
480
 
361
481
  typedef void (*RegressFooVarargsCallback) (const char * param, ...);
482
+
483
+ _GI_TEST_EXTERN
362
484
  void regress_foo_test_varargs_callback (gint i, RegressFooVarargsCallback callback);
485
+
486
+ _GI_TEST_EXTERN
363
487
  void regress_foo_test_varargs_callback2 (RegressFooVarargsCallback callback);
488
+
489
+ _GI_TEST_EXTERN
364
490
  void regress_foo_test_varargs_callback3 (RegressFooVarargsCallback callback,
365
491
  RegressFooVarargsCallback callback2);
366
492
 
367
493
  /* Make sure callbacks get the right scope by default */
494
+ _GI_TEST_EXTERN
368
495
  void regress_foo_async_ready_callback(GCancellable *cancellable,
369
496
  GAsyncReadyCallback callback,
370
497
  gpointer user_data);
498
+
499
+ _GI_TEST_EXTERN
371
500
  void regress_foo_destroy_notify_callback(RegressFooCallback callback,
372
501
  gpointer data,
373
502
  GDestroyNotify destroy);
@@ -377,8 +506,12 @@ typedef enum {
377
506
  REGRESS_FOO_ERROR_BAD,
378
507
  REGRESS_FOO_ERROR_UGLY
379
508
  } RegressFooError;
509
+
510
+ _GI_TEST_EXTERN
380
511
  GType regress_foo_error_get_type (void);
381
512
 
513
+
514
+ _GI_TEST_EXTERN
382
515
  GQuark regress_foo_error_quark (void);
383
516
 
384
517
  typedef enum
@@ -400,7 +533,11 @@ typedef enum
400
533
  } RegressFooASingle;
401
534
 
402
535
  /* Should be skipped */
536
+
537
+ _GI_TEST_EXTERN
403
538
  void regress_foo_some_variant (guint x, va_list args);
539
+
540
+ _GI_TEST_EXTERN
404
541
  void regress_foo_some_variant_ptr (guint x, va_list *args);
405
542
 
406
543
  /**
@@ -424,14 +561,22 @@ struct _RegressFooForeignStruct
424
561
  int regress_foo;
425
562
  };
426
563
 
564
+
565
+ _GI_TEST_EXTERN
427
566
  RegressFooForeignStruct* regress_foo_foreign_struct_new (void);
567
+
568
+ _GI_TEST_EXTERN
428
569
  RegressFooForeignStruct* regress_foo_foreign_struct_copy (RegressFooForeignStruct *original);
429
570
 
430
571
  /* This one should be a global, not a method on UtilityObject since
431
572
  * it's a separate namespace.
432
573
  */
574
+
575
+ _GI_TEST_EXTERN
433
576
  void regress_foo_object_a_global_method (UtilityObject *obj);
434
577
 
578
+
579
+ _GI_TEST_EXTERN
435
580
  RegressFooOtherObject * regress_foo_object_append_new_stack_layer (RegressFooObject *obj, int x);
436
581
 
437
582
  #endif /* __REGRESS_FOO_OBJECT_H__ */
@@ -2,6 +2,8 @@
2
2
  *vim: tabstop=4 shiftwidth=4 expandtab
3
3
  */
4
4
 
5
+ #include "config.h"
6
+
5
7
  #include "gimarshallingtests.h"
6
8
 
7
9
  #include <string.h>
@@ -2014,6 +2016,7 @@ gi_marshalling_tests_garray_utf8_container_inout (GArray **array_)
2014
2016
  g_array_append_val (result, val3);
2015
2017
  g_array_append_val (result, val4);
2016
2018
 
2019
+ g_array_unref (*array_);
2017
2020
  *array_ = result;
2018
2021
  }
2019
2022
 
@@ -2044,6 +2047,7 @@ gi_marshalling_tests_garray_utf8_full_inout (GArray **array_)
2044
2047
  val = g_strdup ("1");
2045
2048
  g_array_append_val (result, val);
2046
2049
 
2050
+ g_array_unref (*array_);
2047
2051
  *array_ = result;
2048
2052
  }
2049
2053
 
@@ -2231,6 +2235,7 @@ gi_marshalling_tests_gptrarray_utf8_container_inout (GPtrArray **parray_)
2231
2235
  g_ptr_array_add (result, (gpointer) val3);
2232
2236
  g_ptr_array_add (result, (gpointer) val4);
2233
2237
 
2238
+ g_ptr_array_unref (*parray_);
2234
2239
  *parray_ = result;
2235
2240
  }
2236
2241
 
@@ -2261,6 +2266,7 @@ gi_marshalling_tests_gptrarray_utf8_full_inout (GPtrArray **parray_)
2261
2266
  val = g_strdup ("1");
2262
2267
  g_ptr_array_add (result, (gpointer) val);
2263
2268
 
2269
+ g_ptr_array_unref (*parray_);
2264
2270
  *parray_ = result;
2265
2271
  }
2266
2272
 
@@ -2607,6 +2613,7 @@ gi_marshalling_tests_glist_utf8_container_inout (GList **list)
2607
2613
  result = g_list_prepend (result, "-1");
2608
2614
  result = g_list_prepend (result, "-2");
2609
2615
 
2616
+ g_list_free (*list);
2610
2617
  *list = result;
2611
2618
  }
2612
2619
 
@@ -2629,6 +2636,7 @@ gi_marshalling_tests_glist_utf8_full_inout (GList **list)
2629
2636
  result = g_list_prepend (result, g_strdup ("-1"));
2630
2637
  result = g_list_prepend (result, g_strdup ("-2"));
2631
2638
 
2639
+ g_list_free_full (*list, g_free);
2632
2640
  *list = result;
2633
2641
  }
2634
2642
 
@@ -2834,6 +2842,7 @@ gi_marshalling_tests_gslist_utf8_container_inout (GSList **list)
2834
2842
  result = g_slist_prepend (result, "-1");
2835
2843
  result = g_slist_prepend (result, "-2");
2836
2844
 
2845
+ g_slist_free (*list);
2837
2846
  *list = result;
2838
2847
  }
2839
2848
 
@@ -2856,6 +2865,7 @@ gi_marshalling_tests_gslist_utf8_full_inout (GSList **list)
2856
2865
  result = g_slist_prepend (result, g_strdup ("-1"));
2857
2866
  result = g_slist_prepend (result, g_strdup ("-2"));
2858
2867
 
2868
+ g_slist_free_full (*list, g_free);
2859
2869
  *list = result;
2860
2870
  }
2861
2871
 
@@ -3060,6 +3070,7 @@ gi_marshalling_tests_ghashtable_utf8_container_inout (GHashTable **hash_table)
3060
3070
  g_hash_table_insert (result, "0", "0");
3061
3071
  g_hash_table_insert (result, "1", "1");
3062
3072
 
3073
+ g_hash_table_unref (*hash_table);
3063
3074
  *hash_table = result;
3064
3075
  }
3065
3076
 
@@ -3082,6 +3093,7 @@ gi_marshalling_tests_ghashtable_utf8_full_inout (GHashTable **hash_table)
3082
3093
  g_hash_table_insert (result, g_strdup ("0"), g_strdup ("0"));
3083
3094
  g_hash_table_insert (result, g_strdup ("1"), g_strdup ("1"));
3084
3095
 
3096
+ g_hash_table_unref (*hash_table);
3085
3097
  *hash_table = result;
3086
3098
  }
3087
3099
 
@@ -3805,6 +3817,7 @@ gi_marshalling_tests_boxed_struct_inout (GIMarshallingTestsBoxedStruct **struct_
3805
3817
  {
3806
3818
  g_assert_cmpint ((*struct_)->long_, ==, 42);
3807
3819
 
3820
+ g_boxed_free (gi_marshalling_tests_boxed_struct_get_type(), *struct_);
3808
3821
  (*struct_) = g_slice_new0 (GIMarshallingTestsBoxedStruct);
3809
3822
  (*struct_)->long_ = 0;
3810
3823
  }
@@ -3982,6 +3995,19 @@ gi_marshalling_tests_object_new (gint int_)
3982
3995
  return g_object_new (GI_MARSHALLING_TESTS_TYPE_OBJECT, "int", int_, NULL);
3983
3996
  }
3984
3997
 
3998
+ GIMarshallingTestsObject *
3999
+ gi_marshalling_tests_object_new_fail (gint int_, GError **error)
4000
+ {
4001
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
4002
+
4003
+ g_set_error_literal (error,
4004
+ g_quark_from_static_string (GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN),
4005
+ GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE,
4006
+ GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE);
4007
+
4008
+ return NULL;
4009
+ }
4010
+
3985
4011
  /**
3986
4012
  * gi_marshalling_tests_object_method_array_in:
3987
4013
  * @ints: (array length=length):
@@ -4114,11 +4140,9 @@ static void
4114
4140
  }
4115
4141
 
4116
4142
  /**
4117
- * gi_marshalling_tests_object_vfunc_with_callback:
4143
+ * gi_marshalling_tests_object_vfunc_with_callback: (virtual vfunc_with_callback)
4118
4144
  * @callback: (scope call) (closure callback_data):
4119
4145
  * @callback_data: (allow-none):
4120
- *
4121
- * Virtual: vfunc_with_callback
4122
4146
  */
4123
4147
  void
4124
4148
  gi_marshalling_tests_object_vfunc_with_callback (GIMarshallingTestsObject *
@@ -4235,11 +4259,12 @@ gi_marshalling_tests_object_full_inout (GIMarshallingTestsObject **object)
4235
4259
  {
4236
4260
  g_assert_cmpint ((*object)->int_, ==, 42);
4237
4261
 
4262
+ g_object_unref (*object);
4238
4263
  *object = g_object_new (GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL);
4239
4264
  }
4240
4265
 
4241
4266
  /**
4242
- * gi_marshalling_tests_object_test_int8_in:
4267
+ * gi_marshalling_tests_object_int8_in:
4243
4268
  * @in: (in):
4244
4269
  */
4245
4270
  void
@@ -4249,7 +4274,7 @@ gi_marshalling_tests_object_int8_in (GIMarshallingTestsObject *object, gint8 in)
4249
4274
  }
4250
4275
 
4251
4276
  /**
4252
- * gi_marshalling_tests_object_test_int8_out:
4277
+ * gi_marshalling_tests_object_int8_out:
4253
4278
  * @out: (out):
4254
4279
  */
4255
4280
  void
@@ -4353,6 +4378,26 @@ glong
4353
4378
  return return_value;
4354
4379
  }
4355
4380
 
4381
+ /**
4382
+ * gi_marshalling_tests_callback_owned_boxed:
4383
+ * @callback: (scope call) (closure callback_data):
4384
+ * @callback_data: (allow-none):
4385
+ */
4386
+ glong
4387
+ gi_marshalling_tests_callback_owned_boxed (GIMarshallingTestsCallbackOwnedBoxed callback,
4388
+ void *callback_data)
4389
+ {
4390
+ static GIMarshallingTestsBoxedStruct *box = NULL;
4391
+ glong ret;
4392
+
4393
+ if (!box)
4394
+ box = gi_marshalling_tests_boxed_struct_new ();
4395
+ box->long_++;
4396
+ callback (box, callback_data);
4397
+ ret = box->long_;
4398
+ return ret;
4399
+ }
4400
+
4356
4401
  gboolean
4357
4402
  gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *self, gint x, GError **error)
4358
4403
  {
@@ -4610,6 +4655,7 @@ gi_marshalling_tests_interface_get_type (void)
4610
4655
  static GType type = 0;
4611
4656
  if (type == 0)
4612
4657
  {
4658
+ /* Not adding prerequisite here for test purposes */
4613
4659
  type = g_type_register_static_simple (G_TYPE_INTERFACE,
4614
4660
  "GIMarshallingTestsInterface",
4615
4661
  sizeof
@@ -4641,6 +4687,42 @@ gi_marshalling_tests_test_interface_test_int8_in (GIMarshallingTestsInterface *t
4641
4687
  }
4642
4688
 
4643
4689
 
4690
+ static void test_interface_init (GIMarshallingTestsInterfaceIface *iface);
4691
+
4692
+ G_DEFINE_TYPE_WITH_CODE (GIMarshallingTestsInterfaceImpl, gi_marshalling_tests_interface_impl, G_TYPE_OBJECT,
4693
+ G_IMPLEMENT_INTERFACE(GI_MARSHALLING_TESTS_TYPE_INTERFACE, test_interface_init))
4694
+
4695
+ static void
4696
+ gi_marshalling_tests_interface_impl_test_int8_in (GIMarshallingTestsInterface *self, gint8 in)
4697
+ {
4698
+ }
4699
+
4700
+ static void test_interface_init (GIMarshallingTestsInterfaceIface *iface)
4701
+ {
4702
+ iface->test_int8_in = gi_marshalling_tests_interface_impl_test_int8_in;
4703
+ }
4704
+
4705
+ static void
4706
+ gi_marshalling_tests_interface_impl_init (GIMarshallingTestsInterfaceImpl *object)
4707
+ {
4708
+ }
4709
+
4710
+ static void
4711
+ gi_marshalling_tests_interface_impl_class_init (GIMarshallingTestsInterfaceImplClass *klass)
4712
+ {
4713
+ }
4714
+
4715
+ /**
4716
+ * gi_marshalling_tests_interface_impl_get_as_interface:
4717
+ *
4718
+ * Returns: (transfer none):
4719
+ */
4720
+ GIMarshallingTestsInterface *
4721
+ gi_marshalling_tests_interface_impl_get_as_interface (GIMarshallingTestsInterfaceImpl *self)
4722
+ {
4723
+ return (GIMarshallingTestsInterface *) self;
4724
+ }
4725
+
4644
4726
  static void
4645
4727
  gi_marshalling_tests_interface2_class_init (void *g_iface)
4646
4728
  {
@@ -4735,6 +4817,83 @@ gi_marshalling_tests_int_return_out (gint *int_)
4735
4817
  return 6;
4736
4818
  }
4737
4819
 
4820
+ /**
4821
+ * gi_marshalling_tests_int_two_in_utf8_two_in_with_allow_none:
4822
+ * @a: (in): Must be 1
4823
+ * @b: (in): Must be 2
4824
+ * @c: (in) (allow-none): Must be "3" or NULL
4825
+ * @d: (in) (allow-none): Must be "4" or NULL
4826
+ */
4827
+ void
4828
+ gi_marshalling_tests_int_two_in_utf8_two_in_with_allow_none (gint a, gint b, const gchar *c, const gchar *d)
4829
+ {
4830
+ g_assert_cmpint (a, ==, 1);
4831
+ g_assert_cmpint (b, ==, 2);
4832
+ if (c != NULL)
4833
+ g_assert_cmpstr (c, ==, "3");
4834
+ if (d != NULL)
4835
+ g_assert_cmpstr (d, ==, "4");
4836
+ }
4837
+
4838
+ /**
4839
+ * gi_marshalling_tests_int_one_in_utf8_two_in_one_allows_none:
4840
+ * @a: (in): Must be 1
4841
+ * @b: (in) (allow-none): Must be "2" or NULL
4842
+ * @c: (in): Must be "3"
4843
+ */
4844
+ void
4845
+ gi_marshalling_tests_int_one_in_utf8_two_in_one_allows_none (gint a, const gchar *b, const gchar *c)
4846
+ {
4847
+ g_assert_cmpint (a, ==, 1);
4848
+ if (b != NULL)
4849
+ g_assert_cmpstr (b, ==, "2");
4850
+ g_assert_cmpstr (c, ==, "3");
4851
+ }
4852
+
4853
+ /**
4854
+ * gi_marshalling_tests_array_in_utf8_two_in:
4855
+ * @ints: (array length=length):
4856
+ * @length:
4857
+ * @a: (in) (allow-none): Must be "1" or NULL
4858
+ * @b: (in) (allow-none): Must be "2" or NULL
4859
+ */
4860
+ void
4861
+ gi_marshalling_tests_array_in_utf8_two_in (const gint *ints, gint length, const gchar *a, const gchar *b)
4862
+ {
4863
+ g_assert_cmpint (length, ==, 4);
4864
+ g_assert_cmpint (ints[0], ==, -1);
4865
+ g_assert_cmpint (ints[1], ==, 0);
4866
+ g_assert_cmpint (ints[2], ==, 1);
4867
+ g_assert_cmpint (ints[3], ==, 2);
4868
+
4869
+ if (a != NULL)
4870
+ g_assert_cmpstr (a, ==, "1");
4871
+ if (b != NULL)
4872
+ g_assert_cmpstr (b, ==, "2");
4873
+ }
4874
+
4875
+ /**
4876
+ * gi_marshalling_tests_array_in_utf8_two_in_out_of_order:
4877
+ * @length:
4878
+ * @a: (in) (allow-none): Must be "1" or NULL
4879
+ * @ints: (array length=length):
4880
+ * @b: (in) (allow-none): Must be "2" or NULL
4881
+ */
4882
+ void
4883
+ gi_marshalling_tests_array_in_utf8_two_in_out_of_order (gint length, const gchar *a, const gint *ints, const gchar *b)
4884
+ {
4885
+ g_assert_cmpint (length, ==, 4);
4886
+ g_assert_cmpint (ints[0], ==, -1);
4887
+ g_assert_cmpint (ints[1], ==, 0);
4888
+ g_assert_cmpint (ints[2], ==, 1);
4889
+ g_assert_cmpint (ints[3], ==, 2);
4890
+
4891
+ if (a != NULL)
4892
+ g_assert_cmpstr (a, ==, "1");
4893
+ if (b != NULL)
4894
+ g_assert_cmpstr (b, ==, "2");
4895
+ }
4896
+
4738
4897
  /* GError */
4739
4898
 
4740
4899
  void
@@ -4934,7 +5093,7 @@ void
4934
5093
  gi_marshalling_tests_param_spec_in_bool (const GParamSpec *param)
4935
5094
  {
4936
5095
  g_assert (G_IS_PARAM_SPEC (param));
4937
- g_assert_cmpint (G_PARAM_SPEC_TYPE (param), ==, G_TYPE_BOOLEAN);
5096
+ g_assert_cmpint (G_PARAM_SPEC_VALUE_TYPE (param), ==, G_TYPE_BOOLEAN);
4938
5097
  g_assert_cmpstr (g_param_spec_get_name ((GParamSpec *) param), ==, "mybool");
4939
5098
  }
4940
5099
 
@@ -5235,10 +5394,7 @@ static void gi_marshalling_tests_properties_object_class_init (GIMarshallingTest
5235
5394
  (), G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
5236
5395
 
5237
5396
  /**
5238
- * GIMarshallingTestsPropertiesObject:some-boxed-glist:
5239
- *
5240
- * Type: GLib.List(gint)
5241
- * Transfer: none
5397
+ * GIMarshallingTestsPropertiesObject:some-boxed-glist: (type GLib.List(gint)) (transfer none):
5242
5398
  */
5243
5399
  g_object_class_install_property (object_class, SOME_BOXED_GLIST_PROPERTY,
5244
5400
  g_param_spec_boxed ("some-boxed-glist",