annotation.c 20 KB

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