1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2
3 /* This file gets installed, so we can't assume config.h is available */
4 #ifdef HAVE_CONFIG_H
5 #include "config.h"
6 #endif
7
8 #include "annotation.h"
9
10 char backslash_parsing_tester = '\\';
11
12 G_DEFINE_TYPE (RegressAnnotationObject, regress_annotation_object, G_TYPE_OBJECT);
13
14 enum {
15 PROP_0,
16 PROP_STRING_PROPERTY,
17 PROP_FUNCTION_PROPERTY,
18 PROP_TAB_PROPERTY
19 };
20
21 enum {
22 STRING_SIGNAL,
23 LIST_SIGNAL,
24 DOC_EMPTY_ARG_PARSING,
25 ATTRIBUTE_SIGNAL,
26 LAST_SIGNAL
27 };
28
29 static guint regress_annotation_object_signals[LAST_SIGNAL] = { 0 };
30
31 static void
regress_annotation_object_set_property(GObject * object,guint prop_id,const GValue * value,GParamSpec * pspec)32 regress_annotation_object_set_property (GObject *object,
33 guint prop_id,
34 const GValue *value,
35 GParamSpec *pspec)
36 {
37 switch (prop_id)
38 {
39 case PROP_STRING_PROPERTY:
40 break;
41 case PROP_FUNCTION_PROPERTY:
42 break;
43 case PROP_TAB_PROPERTY:
44 break;
45 default:
46 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
47 break;
48 }
49 }
50
51 static void
regress_annotation_object_get_property(GObject * object,guint prop_id,GValue * value,GParamSpec * pspec)52 regress_annotation_object_get_property (GObject *object,
53 guint prop_id,
54 GValue *value,
55 GParamSpec *pspec)
56 {
57 switch (prop_id)
58 {
59 case PROP_STRING_PROPERTY:
60 break;
61 case PROP_FUNCTION_PROPERTY:
62 break;
63 case PROP_TAB_PROPERTY:
64 break;
65 default:
66 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
67 break;
68 }
69 }
70
71 static void
regress_annotation_object_class_init(RegressAnnotationObjectClass * klass)72 regress_annotation_object_class_init (RegressAnnotationObjectClass *klass)
73 {
74 GObjectClass *gobject_class;
75
76 gobject_class = G_OBJECT_CLASS (klass);
77
78 gobject_class->set_property = regress_annotation_object_set_property;
79 gobject_class->get_property = regress_annotation_object_get_property;
80
81 /**
82 * RegressAnnotationObject::string-signal:
83 * @regress_annotation: the regress_annotation object
84 * @string: (type utf8): a string
85 *
86 * This is a signal which has a broken signal handler,
87 * it says it's pointer but it's actually a string.
88 *
89 * Since: 1.0
90 * Deprecated: 1.2: Use other-signal instead
91 */
92 regress_annotation_object_signals[STRING_SIGNAL] =
93 g_signal_new ("string-signal",
94 G_OBJECT_CLASS_TYPE (gobject_class),
95 G_SIGNAL_RUN_LAST,
96 0,
97 NULL, NULL,
98 (GSignalCMarshaller)g_cclosure_marshal_VOID__POINTER,
99 G_TYPE_NONE, 1, G_TYPE_POINTER);
100
101 /**
102 * RegressAnnotationObject::list-signal:
103 * @regress_annotation: the regress_annotation object
104 * @list: (type GLib.List) (element-type utf8) (transfer container): a list of strings
105 *
106 * This is a signal which takes a list of strings, but it's not
107 * known by GObject as it's only marked as G_TYPE_POINTER
108 */
109 regress_annotation_object_signals[LIST_SIGNAL] =
110 g_signal_new ("list-signal",
111 G_OBJECT_CLASS_TYPE (gobject_class),
112 G_SIGNAL_RUN_LAST,
113 0,
114 NULL, NULL,
115 (GSignalCMarshaller)g_cclosure_marshal_VOID__POINTER,
116 G_TYPE_NONE, 1, G_TYPE_POINTER);
117
118 /**
119 * RegressAnnotationObject::doc-empty-arg-parsing:
120 * @regress_annotation: the regress_annotation object
121 * @arg1:
122 *
123 * This signal tests an empty document argument (@arg1)
124 */
125 regress_annotation_object_signals[DOC_EMPTY_ARG_PARSING] =
126 g_signal_new ("doc-empty-arg-parsing",
127 G_OBJECT_CLASS_TYPE (gobject_class),
128 G_SIGNAL_RUN_LAST,
129 0,
130 NULL, NULL,
131 (GSignalCMarshaller)g_cclosure_marshal_VOID__POINTER,
132 G_TYPE_NONE, 1, G_TYPE_POINTER);
133
134 /**
135 * RegressAnnotationObject::attribute-signal:
136 * @regress_annotation: the regress_annotation object
137 * @arg1: (attributes some.annotation.foo1=val1): a value
138 * @arg2: (attributes some.annotation.foo2=val2): another value
139 *
140 * This signal tests a signal with attributes.
141 *
142 * Returns: (attributes some.annotation.foo3=val3): the return value
143 */
144 regress_annotation_object_signals[ATTRIBUTE_SIGNAL] =
145 g_signal_new ("attribute-signal",
146 G_OBJECT_CLASS_TYPE (gobject_class),
147 G_SIGNAL_RUN_LAST,
148 0,
149 NULL, NULL,
150 NULL, /* marshaller */
151 G_TYPE_STRING,
152 2,
153 G_TYPE_STRING,
154 G_TYPE_STRING);
155
156 /**
157 * RegressAnnotationObject:string-property:
158 *
159 * This is a property which is a string
160 *
161 * Since: 1.0
162 * Deprecated: 1.2: Use better-string-property instead
163 */
164 g_object_class_install_property (gobject_class,
165 PROP_STRING_PROPERTY,
166 g_param_spec_string ("string-property",
167 "String property",
168 "This property is a string",
169 NULL,
170 G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
171 /**
172 * RegressAnnotationObject:function-property: (type RegressAnnotationCallback)
173 */
174 g_object_class_install_property (gobject_class,
175 PROP_FUNCTION_PROPERTY,
176 g_param_spec_pointer ("function-property",
177 "Function property",
178 "This property is a function pointer",
179 G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
180
181 /**
182 * RegressAnnotationObject:tab-property:
183 *
184 * This is a property annotation intentionally indented with a mix
185 * of tabs and strings to test the tab handling capabilities of the scanner.
186 *
187 * Since: 1.2
188 */
189 g_object_class_install_property (gobject_class,
190 PROP_TAB_PROPERTY,
191 g_param_spec_string ("tab-property",
192 "Tab property",
193 "This property is a thing",
194 NULL,
195 G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
196 }
197
198 static void
regress_annotation_object_init(RegressAnnotationObject * object)199 regress_annotation_object_init (RegressAnnotationObject *object)
200 {
201
202 }
203
204 /**
205 * regress_annotation_object_method:
206 * @object: a #GObject
207 *
208 * Return value: an int
209 **/
210 gint
regress_annotation_object_method(RegressAnnotationObject * object)211 regress_annotation_object_method (RegressAnnotationObject *object)
212 {
213 return 1;
214 }
215
216 /**
217 * regress_annotation_object_out:
218 * @object: a #GObject
219 * @outarg: (out): This is an argument test
220 *
221 * This is a test for out arguments
222 *
223 * Return value: an int
224 */
225 gint
regress_annotation_object_out(RegressAnnotationObject * object,int * outarg)226 regress_annotation_object_out (RegressAnnotationObject *object, int *outarg)
227 {
228 *outarg = 2;
229 return 1;
230 }
231
232 /**
233 * regress_annotation_object_in:
234 * @object: a #GObject
235 * @inarg: (in) (transfer none): This is an argument test
236 *
237 * This is a test for in arguments
238 *
239 * Return value: an int
240 */
241 gint
regress_annotation_object_in(RegressAnnotationObject * object,int * inarg)242 regress_annotation_object_in (RegressAnnotationObject *object, int *inarg)
243 {
244 return *inarg;
245 }
246
247
248 /**
249 * regress_annotation_object_inout:
250 * @object: a #GObject
251 * @inoutarg: (inout): This is an argument test
252 *
253 * This is a test for out arguments
254 *
255 * Return value: an int
256 */
257 gint
regress_annotation_object_inout(RegressAnnotationObject * object,int * inoutarg)258 regress_annotation_object_inout (RegressAnnotationObject *object, int *inoutarg)
259 {
260 return *inoutarg += 1;
261 }
262
263 /**
264 * regress_annotation_object_inout2:
265 * @object: a #GObject
266 * @inoutarg: (inout): This is an argument test
267 *
268 * This is a second test for out arguments
269 *
270 * Return value: an int
271 */
272 gint
regress_annotation_object_inout2(RegressAnnotationObject * object,int * inoutarg)273 regress_annotation_object_inout2 (RegressAnnotationObject *object, int *inoutarg)
274 {
275 return *inoutarg += 1;
276 }
277
278
279 /**
280 * regress_annotation_object_inout3:
281 * @object: a #GObject
282 * @inoutarg: (inout) (allow-none): This is an argument test
283 *
284 * This is a 3th test for out arguments
285 *
286 * Return value: an int
287 */
288 gint
regress_annotation_object_inout3(RegressAnnotationObject * object,int * inoutarg)289 regress_annotation_object_inout3 (RegressAnnotationObject *object, int *inoutarg)
290 {
291 if (inoutarg)
292 return *inoutarg + 1;
293 return 1;
294 }
295
296 /**
297 * regress_annotation_object_calleeowns:
298 * @object: a #GObject
299 * @toown: (out): a #GObject
300 *
301 * This is a test for out arguments; GObject defaults to transfer
302 *
303 * Return value: an int
304 */
305 gint
regress_annotation_object_calleeowns(RegressAnnotationObject * object,GObject ** toown)306 regress_annotation_object_calleeowns (RegressAnnotationObject *object, GObject **toown)
307 {
308 return 1;
309 }
310
311
312 /**
313 * regress_annotation_object_calleesowns:
314 * @object: a #GObject
315 * @toown1: (out) (transfer full): a #GObject
316 * @toown2: (out) (transfer none): a #GObject
317 *
318 * This is a test for out arguments, one transferred, other not
319 *
320 * Return value: an int
321 */
322 gint
regress_annotation_object_calleesowns(RegressAnnotationObject * object,GObject ** toown1,GObject ** toown2)323 regress_annotation_object_calleesowns (RegressAnnotationObject *object,
324 GObject **toown1,
325 GObject **toown2)
326 {
327 return 1;
328 }
329
330
331 /**
332 * regress_annotation_object_get_strings:
333 * @object: a #GObject
334 *
335 * This is a test for returning a list of strings, where
336 * each string needs to be freed.
337 *
338 * Return value: (element-type utf8) (transfer full): list of strings
339 */
340 GList*
regress_annotation_object_get_strings(RegressAnnotationObject * object)341 regress_annotation_object_get_strings (RegressAnnotationObject *object)
342 {
343 GList *list = NULL;
344 list = g_list_prepend (list, g_strdup ("regress_annotation"));
345 list = g_list_prepend (list, g_strdup ("bar"));
346 return list;
347 }
348
349 /**
350 * regress_annotation_object_get_hash:
351 * @object: a #GObject
352 *
353 * This is a test for returning a hash table mapping strings to
354 * objects.
355 *
356 * Return value: (element-type utf8 GObject) (transfer full): hash table
357 */
358 GHashTable*
regress_annotation_object_get_hash(RegressAnnotationObject * object)359 regress_annotation_object_get_hash (RegressAnnotationObject *object)
360 {
361 GHashTable *hash = g_hash_table_new_full (g_str_hash, g_str_equal,
362 g_free, g_object_unref);
363 g_hash_table_insert (hash, g_strdup ("one"), g_object_ref (object));
364 g_hash_table_insert (hash, g_strdup ("two"), g_object_ref (object));
365 return hash;
366 }
367
368 /**
369 * regress_annotation_object_with_voidp:
370 * @data: Opaque pointer handle
371 */
372 void
regress_annotation_object_with_voidp(RegressAnnotationObject * object,void * data)373 regress_annotation_object_with_voidp (RegressAnnotationObject *object, void *data)
374 {
375
376 }
377
378 /**
379 * regress_annotation_object_get_objects:
380 * @object: a #GObject
381 *
382 * This is a test for returning a list of objects.
383 * The list itself should be freed, but not the internal objects,
384 * intentionally similar example to gtk_container_get_children
385 *
386 * Return value: (element-type RegressAnnotationObject) (transfer container): list of objects
387 */
388 GSList*
regress_annotation_object_get_objects(RegressAnnotationObject * object)389 regress_annotation_object_get_objects (RegressAnnotationObject *object)
390 {
391 GSList *list = NULL;
392 list = g_slist_prepend (list, object);
393 return list;
394 }
395
396 /**
397 * regress_annotation_object_create_object:
398 * @object: a #GObject
399 *
400 * Test returning a caller-owned object
401 *
402 * Return value: (transfer full): The object
403 **/
404 GObject*
regress_annotation_object_create_object(RegressAnnotationObject * object)405 regress_annotation_object_create_object (RegressAnnotationObject *object)
406 {
407 return G_OBJECT (g_object_ref (object));
408 }
409
410 /**
411 * regress_annotation_object_use_buffer:
412 * @object: a #GObject
413 *
414 **/
415 void
regress_annotation_object_use_buffer(RegressAnnotationObject * object,guchar * bytes)416 regress_annotation_object_use_buffer (RegressAnnotationObject *object,
417 guchar *bytes)
418 {
419
420 }
421
422 /**
423 * regress_annotation_object_compute_sum:
424 * @object: a #GObject
425 * @nums: (array): Sequence of numbers
426 *
427 * Test taking a zero-terminated array
428 **/
429 void
regress_annotation_object_compute_sum(RegressAnnotationObject * object,int * nums)430 regress_annotation_object_compute_sum (RegressAnnotationObject *object,
431 int *nums)
432 {
433
434 }
435
436 /**
437 * regress_annotation_object_compute_sum_n:
438 * @object: a #GObject
439 * @nums: (array length=n_nums zero-terminated=0): Sequence of
440 * numbers that are zero-terminated
441 * @n_nums: Length of number array
442 *
443 * Test taking an array with length parameter
444 **/
445 void
regress_annotation_object_compute_sum_n(RegressAnnotationObject * object,int * nums,int n_nums)446 regress_annotation_object_compute_sum_n(RegressAnnotationObject *object,
447 int *nums,
448 int n_nums)
449 {
450
451 }
452
453 /**
454 * regress_annotation_object_compute_sum_nz:
455 * @object: a #RegressAnnotationObject
456 * @nums: (array length=n_nums zero-terminated): Sequence of numbers that
457 * are zero-terminated
458 * @n_nums: Length of number array
459 *
460 * Test taking a zero-terminated array with length parameter
461 **/
462 void
regress_annotation_object_compute_sum_nz(RegressAnnotationObject * object,int * nums,int n_nums)463 regress_annotation_object_compute_sum_nz(RegressAnnotationObject *object,
464 int *nums,
465 int n_nums)
466 {
467
468 }
469
470 /**
471 * regress_annotation_object_parse_args:
472 * @object: a #RegressAnnotationObject
473 * @argc: (inout): Length of the argument vector
474 * @argv: (inout) (array length=argc zero-terminated=1): Argument vector
475 *
476 * Test taking a zero-terminated array with length parameter
477 **/
478 void
regress_annotation_object_parse_args(RegressAnnotationObject * object,int * argc,char *** argv)479 regress_annotation_object_parse_args(RegressAnnotationObject *object,
480 int *argc,
481 char ***argv)
482 {
483
484 }
485
486 /**
487 * regress_annotation_object_string_out:
488 * @object: a #RegressAnnotationObject
489 * @str_out: (out) (transfer full): string return value
490 *
491 * Test returning a string as an out parameter
492 *
493 * Returns: some boolean
494 **/
495 gboolean
regress_annotation_object_string_out(RegressAnnotationObject * object,char ** str_out)496 regress_annotation_object_string_out(RegressAnnotationObject *object,
497 char **str_out)
498 {
499 return FALSE;
500 }
501
502 /**
503 * regress_annotation_object_foreach:
504 * @object: a #RegressAnnotationObject
505 * @func: (scope call): Callback to invoke
506 * @user_data: Callback user data
507 *
508 * Test taking a call-scoped callback
509 **/
510 void
regress_annotation_object_foreach(RegressAnnotationObject * object,RegressAnnotationForeachFunc func,gpointer user_data)511 regress_annotation_object_foreach (RegressAnnotationObject *object,
512 RegressAnnotationForeachFunc func,
513 gpointer user_data)
514 {
515
516 }
517
518 /**
519 * regress_annotation_object_set_data:
520 * @object: a #RegressAnnotationObject
521 * @data: (array length=length): The data
522 * @length: Length of the data
523 *
524 * Test taking a guchar * with a length.
525 **/
526 void
regress_annotation_object_set_data(RegressAnnotationObject * object,const guchar * data,gsize length)527 regress_annotation_object_set_data (RegressAnnotationObject *object,
528 const guchar *data,
529 gsize length)
530 {
531
532 }
533
534 /**
535 * regress_annotation_object_set_data2:
536 * @object: a #RegressAnnotationObject
537 * @data: (array length=length) (element-type gint8): The data
538 * @length: Length of the data
539 *
540 * Test taking a gchar * with a length.
541 **/
542 void
regress_annotation_object_set_data2(RegressAnnotationObject * object,const gchar * data,gsize length)543 regress_annotation_object_set_data2 (RegressAnnotationObject *object,
544 const gchar *data,
545 gsize length)
546 {
547
548 }
549
550 /**
551 * regress_annotation_object_set_data3:
552 * @object: a #RegressAnnotationObject
553 * @data: (array length=length) (element-type guint8): The data
554 * @length: Length of the data
555 *
556 * Test taking a gchar * with a length, overriding the array element
557 * type.
558 **/
559 void
regress_annotation_object_set_data3(RegressAnnotationObject * object,gpointer data,gsize length)560 regress_annotation_object_set_data3 (RegressAnnotationObject *object,
561 gpointer data,
562 gsize length)
563 {
564
565 }
566
567 /**
568 * regress_annotation_object_allow_none:
569 * @object: a #GObject
570 * @somearg: (allow-none):
571 *
572 * Returns: (transfer none): %NULL always
573 **/
574 GObject*
regress_annotation_object_allow_none(RegressAnnotationObject * object,const gchar * somearg)575 regress_annotation_object_allow_none (RegressAnnotationObject *object, const gchar *somearg)
576 {
577 return NULL;
578 }
579
580 /**
581 * regress_annotation_object_notrans:
582 * @object: a #GObject
583 *
584 * Returns: (transfer none): An object, not referenced
585 **/
586
587 GObject*
regress_annotation_object_notrans(RegressAnnotationObject * object)588 regress_annotation_object_notrans (RegressAnnotationObject *object)
589 {
590 return NULL;
591 }
592
593 /**
594 * regress_annotation_object_do_not_use:
595 * @object: a #GObject
596 *
597 * Returns: (transfer none): %NULL always
598 * Deprecated: 0.12: Use regress_annotation_object_create_object() instead.
599 **/
600 GObject*
regress_annotation_object_do_not_use(RegressAnnotationObject * object)601 regress_annotation_object_do_not_use (RegressAnnotationObject *object)
602 {
603 return NULL;
604 }
605
606 /**
607 * regress_annotation_object_watch: (skip)
608 * @object: A #RegressAnnotationObject
609 * @func: The callback
610 * @user_data: The callback data
611 *
612 * This is here just for the sake of being overriden by its
613 * regress_annotation_object_watch_full().
614 */
615 void
regress_annotation_object_watch(RegressAnnotationObject * object,RegressAnnotationForeachFunc func,gpointer user_data)616 regress_annotation_object_watch (RegressAnnotationObject *object,
617 RegressAnnotationForeachFunc func,
618 gpointer user_data)
619 {
620 }
621
622 /**
623 * regress_annotation_object_watch_full: (rename-to regress_annotation_object_watch)
624 * @object: A #RegressAnnotationObject
625 * @func: The callback
626 * @user_data: The callback data
627 * @destroy: Destroy notification
628 *
629 * Test overriding via the "Rename To" annotation.
630 */
631 void
regress_annotation_object_watch_full(RegressAnnotationObject * object,RegressAnnotationForeachFunc func,gpointer user_data,GDestroyNotify destroy)632 regress_annotation_object_watch_full (RegressAnnotationObject *object,
633 RegressAnnotationForeachFunc func,
634 gpointer user_data,
635 GDestroyNotify destroy)
636 {
637 }
638
639 /**
640 * regress_annotation_object_hidden_self:
641 * @object: (type RegressAnnotationObject): A #RegressAnnotationObject
642 **/
643 void
regress_annotation_object_hidden_self(gpointer object)644 regress_annotation_object_hidden_self (gpointer object)
645 {
646 }
647
648 /**
649 * regress_annotation_init:
650 * @argc: (inout): The number of args.
651 * @argv: (inout) (array length=argc): The arguments.
652 **/
653 void
regress_annotation_init(int * argc,char *** argv)654 regress_annotation_init (int *argc, char ***argv)
655 {
656
657 }
658
659 /**
660 * regress_annotation_return_array:
661 * @length: (out): Number of return values
662 *
663 * Return value: (transfer full) (array length=length): The return value
664 **/
665 char **
regress_annotation_return_array(int * length)666 regress_annotation_return_array (int *length)
667 {
668 return NULL;
669 }
670
671 /**
672 * regress_annotation_string_zero_terminated:
673 *
674 * Return value: (transfer full) (array zero-terminated=1): The return value
675 **/
676 char **
regress_annotation_string_zero_terminated(void)677 regress_annotation_string_zero_terminated (void)
678 {
679 return NULL;
680 }
681
682 /**
683 * regress_annotation_string_zero_terminated_out:
684 * @out: (array zero-terminated=1) (inout):
685 **/
686 void
regress_annotation_string_zero_terminated_out(char *** out)687 regress_annotation_string_zero_terminated_out (char ***out)
688 {
689 }
690
691 /**
692 * regress_annotation_versioned:
693 *
694 * Since: 0.6
695 **/
696 void
regress_annotation_versioned(void)697 regress_annotation_versioned (void)
698 {
699 }
700
701 /**
702 * regress_annotation_string_array_length:
703 * @n_properties:
704 * @properties: (array length=n_properties) (element-type utf8):
705 */
706 void
regress_annotation_string_array_length(guint n_properties,const gchar * const properties[])707 regress_annotation_string_array_length (guint n_properties, const gchar * const properties[])
708 {
709 }
710
711 /**
712 * regress_annotation_object_extra_annos: (attributes org.foobar=testvalue)
713 */
714 void
regress_annotation_object_extra_annos(RegressAnnotationObject * object)715 regress_annotation_object_extra_annos (RegressAnnotationObject *object)
716 {
717 }
718
719 /**
720 * regress_annotation_custom_destroy:
721 * @callback: (destroy destroy) (closure data): Destroy notification
722 *
723 * Test messing up the heuristic of closure/destroy-notification
724 * detection, and fixing it via annotations.
725 */
726 void
regress_annotation_custom_destroy(RegressAnnotationCallback callback,RegressAnnotationNotifyFunc destroy,gpointer data)727 regress_annotation_custom_destroy (RegressAnnotationCallback callback,
728 RegressAnnotationNotifyFunc destroy,
729 gpointer data)
730 {
731 }
732
733 /**
734 * regress_annotation_get_source_file:
735 *
736 * Return value: (type filename) (transfer full): Source file
737 */
738 char *
regress_annotation_get_source_file(void)739 regress_annotation_get_source_file (void)
740 {
741 return NULL;
742 }
743
744 /**
745 * regress_annotation_set_source_file:
746 * @fname: (type filename): Source file
747 *
748 */
749 void
regress_annotation_set_source_file(const char * fname)750 regress_annotation_set_source_file (const char *fname)
751 {
752 }
753
754 /**
755 * regress_annotation_ptr_array:
756 * @array: (element-type GObject.Value): the array
757 */
758 void
regress_annotation_ptr_array(GPtrArray * array)759 regress_annotation_ptr_array (GPtrArray *array)
760 {
761 }
762
763 /**
764 * regress_annotation_attribute_func:
765 * @object: A #RegressAnnotationObject.
766 * @data: (attributes some.annotation=value another.annotation=blahvalue): Some data.
767 *
768 * Returns: (attributes some.other.annotation=value2 yet.another.annotation=another_value): The return value.
769 */
770 gint
regress_annotation_attribute_func(RegressAnnotationObject * object,const gchar * data)771 regress_annotation_attribute_func (RegressAnnotationObject *object,
772 const gchar *data)
773 {
774 return 42;
775 }
776
777 /**
778 * regress_annotation_invalid_regress_annotation:
779 * @foo: some text (e.g. example) or else
780 */
781 void
regress_annotation_invalid_regress_annotation(int foo)782 regress_annotation_invalid_regress_annotation (int foo)
783 {
784
785 }
786
787
788 char backslash_parsing_tester_2 = '\\';
789
790
791 /**
792 * regress_annotation_test_parsing_bug630862:
793 *
794 * See https://bugzilla.gnome.org/show_bug.cgi?id=630862
795 *
796 * Returns: (transfer none): An object, note the colon:in here
797 */
798 GObject *
regress_annotation_test_parsing_bug630862(void)799 regress_annotation_test_parsing_bug630862 (void)
800 {
801 return NULL;
802 }
803
804
805 /**
806 * regress_annotation_space_after_comment_bug631690:
807 *
808 * Explicitly test having a space after the ** here.
809 */
810 void
regress_annotation_space_after_comment_bug631690(void)811 regress_annotation_space_after_comment_bug631690 (void)
812 {
813 }
814
815 /**
816 * regress_annotation_return_filename:
817 *
818 * Returns: (type filename): An annotated filename
819 */
820 gchar*
regress_annotation_return_filename(void)821 regress_annotation_return_filename (void)
822 {
823 return g_strdup ("a utf-8 filename");
824 }
825
826 /**
827 * regress_annotation_transfer_floating:
828 * @object: (in) (transfer floating): an object
829 *
830 * Returns: (transfer floating): A floating object
831 */
832 GObject *
regress_annotation_transfer_floating(GObject * object)833 regress_annotation_transfer_floating (GObject *object)
834 {
835 return NULL;
836 }
837