atk-glib-fix.patch 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. [PATCH] Fix build with modern glib versions
  2. G_CONST_RETURN is deprecated, so replace with 'const' instead.
  3. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  4. ---
  5. atk/atkaction.c | 8 ++++----
  6. atk/atkaction.h | 16 ++++++++--------
  7. atk/atkdocument.c | 6 +++---
  8. atk/atkdocument.h | 12 ++++++------
  9. atk/atkimage.c | 4 ++--
  10. atk/atkimage.h | 8 ++++----
  11. atk/atkobject.c | 18 +++++++++---------
  12. atk/atkobject.h | 12 ++++++------
  13. atk/atkrelation.c | 2 +-
  14. atk/atkrelation.h | 2 +-
  15. atk/atkstate.c | 2 +-
  16. atk/atkstate.h | 2 +-
  17. atk/atkstreamablecontent.c | 2 +-
  18. atk/atkstreamablecontent.h | 10 +++++-----
  19. atk/atktable.c | 4 ++--
  20. atk/atktable.h | 8 ++++----
  21. atk/atktext.c | 4 ++--
  22. atk/atktext.h | 4 ++--
  23. atk/atkutil.c | 6 +++---
  24. atk/atkutil.h | 10 +++++-----
  25. tests/testrelation.c | 6 +++---
  26. tests/teststateset.c | 2 +-
  27. 22 files changed, 74 insertions(+), 74 deletions(-)
  28. Index: atk-1.33.6/atk/atkaction.c
  29. ===================================================================
  30. --- atk-1.33.6.orig/atk/atkaction.c
  31. +++ atk-1.33.6/atk/atkaction.c
  32. @@ -101,7 +101,7 @@
  33. * Returns a description string, or %NULL
  34. * if @action does not implement this interface.
  35. **/
  36. -G_CONST_RETURN gchar*
  37. +const gchar*
  38. atk_action_get_description (AtkAction *obj,
  39. gint i)
  40. {
  41. @@ -140,7 +140,7 @@
  42. * Returns a name string, or %NULL
  43. * if @action does not implement this interface.
  44. **/
  45. -G_CONST_RETURN gchar*
  46. +const gchar*
  47. atk_action_get_name (AtkAction *obj,
  48. gint i)
  49. {
  50. @@ -166,7 +166,7 @@
  51. * Returns a name string, or %NULL
  52. * if @action does not implement this interface.
  53. **/
  54. -G_CONST_RETURN gchar*
  55. +const gchar*
  56. atk_action_get_localized_name (AtkAction *obj,
  57. gint i)
  58. {
  59. @@ -203,7 +203,7 @@
  60. * if there is no keybinding for this action.
  61. *
  62. **/
  63. -G_CONST_RETURN gchar*
  64. +const gchar*
  65. atk_action_get_keybinding (AtkAction *obj,
  66. gint i)
  67. {
  68. Index: atk-1.33.6/atk/atkaction.h
  69. ===================================================================
  70. --- atk-1.33.6.orig/atk/atkaction.h
  71. +++ atk-1.33.6/atk/atkaction.h
  72. @@ -55,16 +55,16 @@
  73. gboolean (*do_action) (AtkAction *action,
  74. gint i);
  75. gint (*get_n_actions) (AtkAction *action);
  76. - G_CONST_RETURN gchar* (*get_description) (AtkAction *action,
  77. + const gchar* (*get_description) (AtkAction *action,
  78. gint i);
  79. - G_CONST_RETURN gchar* (*get_name) (AtkAction *action,
  80. + const gchar* (*get_name) (AtkAction *action,
  81. gint i);
  82. - G_CONST_RETURN gchar* (*get_keybinding) (AtkAction *action,
  83. + const gchar* (*get_keybinding) (AtkAction *action,
  84. gint i);
  85. gboolean (*set_description) (AtkAction *action,
  86. gint i,
  87. const gchar *desc);
  88. - G_CONST_RETURN gchar* (*get_localized_name)(AtkAction *action,
  89. + const gchar* (*get_localized_name)(AtkAction *action,
  90. gint i);
  91. AtkFunction pad2;
  92. };
  93. @@ -85,11 +85,11 @@
  94. gboolean atk_action_do_action (AtkAction *action,
  95. gint i);
  96. gint atk_action_get_n_actions (AtkAction *action);
  97. -G_CONST_RETURN gchar* atk_action_get_description (AtkAction *action,
  98. +const gchar* atk_action_get_description (AtkAction *action,
  99. gint i);
  100. -G_CONST_RETURN gchar* atk_action_get_name (AtkAction *action,
  101. +const gchar* atk_action_get_name (AtkAction *action,
  102. gint i);
  103. -G_CONST_RETURN gchar* atk_action_get_keybinding (AtkAction *action,
  104. +const gchar* atk_action_get_keybinding (AtkAction *action,
  105. gint i);
  106. gboolean atk_action_set_description (AtkAction *action,
  107. gint i,
  108. @@ -97,7 +97,7 @@
  109. /* NEW in ATK 1.1: */
  110. -G_CONST_RETURN gchar* atk_action_get_localized_name (AtkAction *action,
  111. +const gchar* atk_action_get_localized_name (AtkAction *action,
  112. gint i);
  113. /*
  114. Index: atk-1.33.6/atk/atkdocument.c
  115. ===================================================================
  116. --- atk-1.33.6.orig/atk/atkdocument.c
  117. +++ atk-1.33.6/atk/atkdocument.c
  118. @@ -93,7 +93,7 @@
  119. *
  120. * Returns: a string indicating the document type
  121. **/
  122. -G_CONST_RETURN gchar*
  123. +const gchar*
  124. atk_document_get_document_type (AtkDocument *document)
  125. {
  126. AtkDocumentIface *iface;
  127. @@ -155,7 +155,7 @@
  128. * locale of the document content as a whole, or NULL if
  129. * the document content does not specify a locale.
  130. **/
  131. -G_CONST_RETURN gchar *
  132. +const gchar *
  133. atk_document_get_locale (AtkDocument *document)
  134. {
  135. AtkDocumentIface *iface;
  136. @@ -219,7 +219,7 @@
  137. * document, or NULL if a value for #attribute_name has not been specified
  138. * for this document.
  139. */
  140. -G_CONST_RETURN gchar *
  141. +const gchar *
  142. atk_document_get_attribute_value (AtkDocument *document,
  143. const gchar *attribute_name)
  144. {
  145. Index: atk-1.33.6/atk/atkdocument.h
  146. ===================================================================
  147. --- atk-1.33.6.orig/atk/atkdocument.h
  148. +++ atk-1.33.6/atk/atkdocument.h
  149. @@ -49,12 +49,12 @@
  150. struct _AtkDocumentIface
  151. {
  152. GTypeInterface parent;
  153. - G_CONST_RETURN gchar* ( *get_document_type) (AtkDocument *document);
  154. + const gchar* ( *get_document_type) (AtkDocument *document);
  155. gpointer ( *get_document) (AtkDocument *document);
  156. - G_CONST_RETURN gchar* ( *get_document_locale) (AtkDocument *document);
  157. + const gchar* ( *get_document_locale) (AtkDocument *document);
  158. AtkAttributeSet * ( *get_document_attributes) (AtkDocument *document);
  159. - G_CONST_RETURN gchar* ( *get_document_attribute_value) (AtkDocument *document,
  160. + const gchar* ( *get_document_attribute_value) (AtkDocument *document,
  161. const gchar *attribute_name);
  162. gboolean ( *set_document_attribute) (AtkDocument *document,
  163. const gchar *attribute_name,
  164. @@ -68,11 +68,11 @@
  165. GType atk_document_get_type (void);
  166. -G_CONST_RETURN gchar* atk_document_get_document_type (AtkDocument *document);
  167. +const gchar* atk_document_get_document_type (AtkDocument *document);
  168. gpointer atk_document_get_document (AtkDocument *document);
  169. -G_CONST_RETURN gchar* atk_document_get_locale (AtkDocument *document);
  170. +const gchar* atk_document_get_locale (AtkDocument *document);
  171. AtkAttributeSet* atk_document_get_attributes (AtkDocument *document);
  172. -G_CONST_RETURN gchar* atk_document_get_attribute_value (AtkDocument *document,
  173. +const gchar* atk_document_get_attribute_value (AtkDocument *document,
  174. const gchar *attribute_name);
  175. gboolean atk_document_set_attribute_value (AtkDocument *document,
  176. const gchar *attribute_name,
  177. Index: atk-1.33.6/atk/atkimage.c
  178. ===================================================================
  179. --- atk-1.33.6.orig/atk/atkimage.c
  180. +++ atk-1.33.6/atk/atkimage.c
  181. @@ -46,7 +46,7 @@
  182. *
  183. * Returns: a string representing the image description
  184. **/
  185. -G_CONST_RETURN gchar*
  186. +const gchar*
  187. atk_image_get_image_description (AtkImage *image)
  188. {
  189. AtkImageIface *iface;
  190. @@ -192,7 +192,7 @@
  191. * Returns a string corresponding to the POSIX LC_MESSAGES locale used by the image description, or NULL if the image does not specify a locale.
  192. *
  193. */
  194. -G_CONST_RETURN gchar*
  195. +const gchar*
  196. atk_image_get_image_locale (AtkImage *image)
  197. {
  198. Index: atk-1.33.6/atk/atkimage.h
  199. ===================================================================
  200. --- atk-1.33.6.orig/atk/atkimage.h
  201. +++ atk-1.33.6/atk/atkimage.h
  202. @@ -53,13 +53,13 @@
  203. gint *x,
  204. gint *y,
  205. AtkCoordType coord_type);
  206. - G_CONST_RETURN gchar* ( *get_image_description) (AtkImage *image);
  207. + const gchar* ( *get_image_description) (AtkImage *image);
  208. void ( *get_image_size) (AtkImage *image,
  209. gint *width,
  210. gint *height);
  211. gboolean ( *set_image_description) (AtkImage *image,
  212. const gchar *description);
  213. - G_CONST_RETURN gchar* ( *get_image_locale) (AtkImage *image);
  214. + const gchar* ( *get_image_locale) (AtkImage *image);
  215. AtkFunction pad1;
  216. @@ -67,7 +67,7 @@
  217. GType atk_image_get_type (void);
  218. -G_CONST_RETURN gchar* atk_image_get_image_description (AtkImage *image);
  219. +const gchar* atk_image_get_image_description (AtkImage *image);
  220. void atk_image_get_image_size (AtkImage *image,
  221. gint *width,
  222. @@ -80,7 +80,7 @@
  223. gint *y,
  224. AtkCoordType coord_type);
  225. -G_CONST_RETURN gchar* atk_image_get_image_locale (AtkImage *image);
  226. +const gchar* atk_image_get_image_locale (AtkImage *image);
  227. G_END_DECLS
  228. Index: atk-1.33.6/atk/atkobject.c
  229. ===================================================================
  230. --- atk-1.33.6.orig/atk/atkobject.c
  231. +++ atk-1.33.6/atk/atkobject.c
  232. @@ -285,9 +285,9 @@
  233. GValue *value,
  234. GParamSpec *pspec);
  235. static void atk_object_finalize (GObject *object);
  236. -static G_CONST_RETURN gchar*
  237. +static const gchar*
  238. atk_object_real_get_name (AtkObject *object);
  239. -static G_CONST_RETURN gchar*
  240. +static const gchar*
  241. atk_object_real_get_description
  242. (AtkObject *object);
  243. static AtkObject* atk_object_real_get_parent (AtkObject *object);
  244. @@ -692,7 +692,7 @@
  245. *
  246. * Returns: a character string representing the accessible name of the object.
  247. **/
  248. -G_CONST_RETURN gchar*
  249. +const gchar*
  250. atk_object_get_name (AtkObject *accessible)
  251. {
  252. AtkObjectClass *klass;
  253. @@ -716,7 +716,7 @@
  254. * of the accessible.
  255. *
  256. **/
  257. -G_CONST_RETURN gchar*
  258. +const gchar*
  259. atk_object_get_description (AtkObject *accessible)
  260. {
  261. AtkObjectClass *klass;
  262. @@ -1125,7 +1125,7 @@
  263. AtkState state,
  264. gboolean value)
  265. {
  266. - G_CONST_RETURN gchar* name;
  267. + const gchar* name;
  268. g_return_if_fail (ATK_IS_OBJECT (accessible));
  269. @@ -1323,13 +1323,13 @@
  270. G_OBJECT_CLASS (parent_class)->finalize (object);
  271. }
  272. -static G_CONST_RETURN gchar*
  273. +static const gchar*
  274. atk_object_real_get_name (AtkObject *object)
  275. {
  276. return object->name;
  277. }
  278. -static G_CONST_RETURN gchar*
  279. +static const gchar*
  280. atk_object_real_get_description (AtkObject *object)
  281. {
  282. return object->description;
  283. @@ -1491,7 +1491,7 @@
  284. *
  285. * Returns: the string describing the AtkRole
  286. */
  287. -G_CONST_RETURN gchar*
  288. +const gchar*
  289. atk_role_get_name (AtkRole role)
  290. {
  291. if (role >= 0 && role < ATK_ROLE_LAST_DEFINED)
  292. @@ -1518,7 +1518,7 @@
  293. *
  294. * Returns: the localized string describing the AtkRole
  295. **/
  296. -G_CONST_RETURN gchar*
  297. +const gchar*
  298. atk_role_get_localized_name (AtkRole role)
  299. {
  300. gettext_initialization ();
  301. Index: atk-1.33.6/atk/atkobject.h
  302. ===================================================================
  303. --- atk-1.33.6.orig/atk/atkobject.h
  304. +++ atk-1.33.6/atk/atkobject.h
  305. @@ -381,11 +381,11 @@
  306. /*
  307. * Gets the accessible name of the object
  308. */
  309. - G_CONST_RETURN gchar* (* get_name) (AtkObject *accessible);
  310. + const gchar* (* get_name) (AtkObject *accessible);
  311. /*
  312. * Gets the accessible description of the object
  313. */
  314. - G_CONST_RETURN gchar* (* get_description) (AtkObject *accessible);
  315. + const gchar* (* get_description) (AtkObject *accessible);
  316. /*
  317. * Gets the accessible parent of the object
  318. */
  319. @@ -535,8 +535,8 @@
  320. * Properties directly supported by AtkObject
  321. */
  322. -G_CONST_RETURN gchar* atk_object_get_name (AtkObject *accessible);
  323. -G_CONST_RETURN gchar* atk_object_get_description (AtkObject *accessible);
  324. +const gchar* atk_object_get_name (AtkObject *accessible);
  325. +const gchar* atk_object_get_description (AtkObject *accessible);
  326. AtkObject* atk_object_get_parent (AtkObject *accessible);
  327. gint atk_object_get_n_accessible_children (AtkObject *accessible);
  328. AtkObject* atk_object_ref_accessible_child (AtkObject *accessible,
  329. @@ -571,7 +571,7 @@
  330. void atk_object_initialize (AtkObject *accessible,
  331. gpointer data);
  332. -G_CONST_RETURN gchar* atk_role_get_name (AtkRole role);
  333. +const gchar* atk_role_get_name (AtkRole role);
  334. AtkRole atk_role_for_name (const gchar *name);
  335. @@ -582,7 +582,7 @@
  336. gboolean atk_object_remove_relationship (AtkObject *object,
  337. AtkRelationType relationship,
  338. AtkObject *target);
  339. -G_CONST_RETURN gchar* atk_role_get_localized_name (AtkRole role);
  340. +const gchar* atk_role_get_localized_name (AtkRole role);
  341. /* */
  342. Index: atk-1.33.6/atk/atkrelation.c
  343. ===================================================================
  344. --- atk-1.33.6.orig/atk/atkrelation.c
  345. +++ atk-1.33.6/atk/atkrelation.c
  346. @@ -130,7 +130,7 @@
  347. *
  348. * Returns: the string describing the AtkRelationType
  349. */
  350. -G_CONST_RETURN gchar*
  351. +const gchar*
  352. atk_relation_type_get_name (AtkRelationType type)
  353. {
  354. GTypeClass *type_class;
  355. Index: atk-1.33.6/atk/atkrelation.h
  356. ===================================================================
  357. --- atk-1.33.6.orig/atk/atkrelation.h
  358. +++ atk-1.33.6/atk/atkrelation.h
  359. @@ -61,7 +61,7 @@
  360. GType atk_relation_get_type (void);
  361. AtkRelationType atk_relation_type_register (const gchar *name);
  362. -G_CONST_RETURN gchar* atk_relation_type_get_name (AtkRelationType type);
  363. +const gchar* atk_relation_type_get_name (AtkRelationType type);
  364. AtkRelationType atk_relation_type_for_name (const gchar *name);
  365. /*
  366. Index: atk-1.33.6/atk/atkstate.c
  367. ===================================================================
  368. --- atk-1.33.6.orig/atk/atkstate.c
  369. +++ atk-1.33.6/atk/atkstate.c
  370. @@ -57,7 +57,7 @@
  371. *
  372. * Returns: the string describing the AtkStateType
  373. */
  374. -G_CONST_RETURN gchar*
  375. +const gchar*
  376. atk_state_type_get_name (AtkStateType type)
  377. {
  378. GTypeClass *type_class;
  379. Index: atk-1.33.6/atk/atkstate.h
  380. ===================================================================
  381. --- atk-1.33.6.orig/atk/atkstate.h
  382. +++ atk-1.33.6/atk/atkstate.h
  383. @@ -170,7 +170,7 @@
  384. AtkStateType atk_state_type_register (const gchar *name);
  385. -G_CONST_RETURN gchar* atk_state_type_get_name (AtkStateType type);
  386. +const gchar* atk_state_type_get_name (AtkStateType type);
  387. AtkStateType atk_state_type_for_name (const gchar *name);
  388. G_END_DECLS
  389. Index: atk-1.33.6/atk/atkstreamablecontent.c
  390. ===================================================================
  391. --- atk-1.33.6.orig/atk/atkstreamablecontent.c
  392. +++ atk-1.33.6/atk/atkstreamablecontent.c
  393. @@ -73,7 +73,7 @@
  394. * Returns : a gchar* representing the specified mime type; the caller
  395. * should not free the character string.
  396. **/
  397. -G_CONST_RETURN gchar*
  398. +const gchar*
  399. atk_streamable_content_get_mime_type (AtkStreamableContent *streamable,
  400. gint i)
  401. {
  402. Index: atk-1.33.6/atk/atkstreamablecontent.h
  403. ===================================================================
  404. --- atk-1.33.6.orig/atk/atkstreamablecontent.h
  405. +++ atk-1.33.6/atk/atkstreamablecontent.h
  406. @@ -54,11 +54,11 @@
  407. * at index 0 should be considered the "default" data type for the stream.
  408. *
  409. * This assumes that the strings for the mime types are stored in the
  410. - * AtkStreamableContent. Alternatively the G_CONST_RETURN could be removed
  411. + * AtkStreamableContent. Alternatively the const could be removed
  412. * and the caller would be responsible for calling g_free() on the
  413. * returned value.
  414. */
  415. - G_CONST_RETURN gchar* (* get_mime_type) (AtkStreamableContent *streamable,
  416. + const gchar* (* get_mime_type) (AtkStreamableContent *streamable,
  417. gint i);
  418. /*
  419. * One possible implementation for this method is that it constructs the
  420. @@ -80,7 +80,7 @@
  421. * constructed. Note that it is possible for get_uri to return NULL but for
  422. * get_stream to work nonetheless, since not all GIOChannels connect to URIs.
  423. */
  424. - G_CONST_RETURN gchar* (* get_uri) (AtkStreamableContent *streamable,
  425. + const gchar* (* get_uri) (AtkStreamableContent *streamable,
  426. const gchar *mime_type);
  427. @@ -92,12 +92,12 @@
  428. gint atk_streamable_content_get_n_mime_types (AtkStreamableContent *streamable);
  429. -G_CONST_RETURN gchar* atk_streamable_content_get_mime_type (AtkStreamableContent *streamable,
  430. +const gchar* atk_streamable_content_get_mime_type (AtkStreamableContent *streamable,
  431. gint i);
  432. GIOChannel* atk_streamable_content_get_stream (AtkStreamableContent *streamable,
  433. const gchar *mime_type);
  434. -G_CONST_RETURN gchar* atk_streamable_content_get_uri (AtkStreamableContent *streamable,
  435. +const gchar* atk_streamable_content_get_uri (AtkStreamableContent *streamable,
  436. const gchar *mime_type);
  437. G_END_DECLS
  438. Index: atk-1.33.6/atk/atktable.c
  439. ===================================================================
  440. --- atk-1.33.6.orig/atk/atktable.c
  441. +++ atk-1.33.6/atk/atktable.c
  442. @@ -301,7 +301,7 @@
  443. * Returns: a gchar* representing the column description, or %NULL
  444. * if value does not implement this interface.
  445. **/
  446. -G_CONST_RETURN gchar*
  447. +const gchar*
  448. atk_table_get_column_description (AtkTable *table,
  449. gint column)
  450. {
  451. @@ -405,7 +405,7 @@
  452. * Returns: a gchar* representing the row description, or %NULL
  453. * if value does not implement this interface.
  454. **/
  455. -G_CONST_RETURN gchar*
  456. +const gchar*
  457. atk_table_get_row_description (AtkTable *table,
  458. gint row)
  459. {
  460. Index: atk-1.33.6/atk/atktable.h
  461. ===================================================================
  462. --- atk-1.33.6.orig/atk/atktable.h
  463. +++ atk-1.33.6/atk/atktable.h
  464. @@ -69,12 +69,12 @@
  465. gint column);
  466. AtkObject*
  467. (* get_caption) (AtkTable *table);
  468. - G_CONST_RETURN gchar*
  469. + const gchar*
  470. (* get_column_description) (AtkTable *table,
  471. gint column);
  472. AtkObject* (* get_column_header) (AtkTable *table,
  473. gint column);
  474. - G_CONST_RETURN gchar*
  475. + const gchar*
  476. (* get_row_description) (AtkTable *table,
  477. gint row);
  478. AtkObject* (* get_row_header) (AtkTable *table,
  479. @@ -163,12 +163,12 @@
  480. gint column);
  481. AtkObject*
  482. atk_table_get_caption (AtkTable *table);
  483. -G_CONST_RETURN gchar*
  484. +const gchar*
  485. atk_table_get_column_description (AtkTable *table,
  486. gint column);
  487. AtkObject* atk_table_get_column_header (AtkTable *table,
  488. gint column);
  489. -G_CONST_RETURN gchar*
  490. +const gchar*
  491. atk_table_get_row_description (AtkTable *table,
  492. gint row);
  493. AtkObject* atk_table_get_row_header (AtkTable *table,
  494. Index: atk-1.33.6/atk/atktext.c
  495. ===================================================================
  496. --- atk-1.33.6.orig/atk/atktext.c
  497. +++ atk-1.33.6/atk/atktext.c
  498. @@ -1054,7 +1054,7 @@
  499. *
  500. * Returns: a string containing the name; this string should not be freed
  501. **/
  502. -G_CONST_RETURN gchar*
  503. +const gchar*
  504. atk_text_attribute_get_name (AtkTextAttribute attr)
  505. {
  506. GTypeClass *type_class;
  507. @@ -1150,7 +1150,7 @@
  508. * Returns: a string containing the value; this string should not be freed;
  509. * NULL is returned if there are no values maintained for the attr value.
  510. **/
  511. -G_CONST_RETURN gchar*
  512. +const gchar*
  513. atk_text_attribute_get_value (AtkTextAttribute attr,
  514. gint index)
  515. {
  516. Index: atk-1.33.6/atk/atktext.h
  517. ===================================================================
  518. --- atk-1.33.6.orig/atk/atktext.h
  519. +++ atk-1.33.6/atk/atktext.h
  520. @@ -355,9 +355,9 @@
  521. AtkTextClipType y_clip_type);
  522. void atk_text_free_ranges (AtkTextRange **ranges);
  523. void atk_attribute_set_free (AtkAttributeSet *attrib_set);
  524. -G_CONST_RETURN gchar* atk_text_attribute_get_name (AtkTextAttribute attr);
  525. +const gchar* atk_text_attribute_get_name (AtkTextAttribute attr);
  526. AtkTextAttribute atk_text_attribute_for_name (const gchar *name);
  527. -G_CONST_RETURN gchar* atk_text_attribute_get_value (AtkTextAttribute attr,
  528. +const gchar* atk_text_attribute_get_value (AtkTextAttribute attr,
  529. gint index_);
  530. G_END_DECLS
  531. Index: atk-1.33.6/atk/atkutil.c
  532. ===================================================================
  533. --- atk-1.33.6.orig/atk/atkutil.c
  534. +++ atk-1.33.6/atk/atkutil.c
  535. @@ -342,7 +342,7 @@
  536. *
  537. * Returns: name string for the GUI toolkit implementing ATK for this application
  538. **/
  539. -G_CONST_RETURN gchar*
  540. +const gchar*
  541. atk_get_toolkit_name (void)
  542. {
  543. const gchar *retval;
  544. @@ -367,7 +367,7 @@
  545. *
  546. * Returns: version string for the GUI toolkit implementing ATK for this application
  547. **/
  548. -G_CONST_RETURN gchar*
  549. +const gchar*
  550. atk_get_toolkit_version (void)
  551. {
  552. const gchar *retval;
  553. @@ -394,7 +394,7 @@
  554. *
  555. * Since: 1.20
  556. */
  557. -G_CONST_RETURN gchar *
  558. +const gchar *
  559. atk_get_version (void)
  560. {
  561. return VERSION;
  562. Index: atk-1.33.6/atk/atkutil.h
  563. ===================================================================
  564. --- atk-1.33.6.orig/atk/atkutil.h
  565. +++ atk-1.33.6/atk/atkutil.h
  566. @@ -147,8 +147,8 @@
  567. gpointer data);
  568. void (* remove_key_event_listener) (guint listener_id);
  569. AtkObject* (* get_root) (void);
  570. - G_CONST_RETURN gchar* (* get_toolkit_name) (void);
  571. - G_CONST_RETURN gchar* (* get_toolkit_version) (void);
  572. + const gchar* (* get_toolkit_name) (void);
  573. + const gchar* (* get_toolkit_version) (void);
  574. };
  575. GType atk_util_get_type (void);
  576. @@ -229,17 +229,17 @@
  577. /*
  578. * Returns name string for the GUI toolkit.
  579. */
  580. -G_CONST_RETURN gchar *atk_get_toolkit_name (void);
  581. +const gchar *atk_get_toolkit_name (void);
  582. /*
  583. * Returns version string for the GUI toolkit.
  584. */
  585. -G_CONST_RETURN gchar *atk_get_toolkit_version (void);
  586. +const gchar *atk_get_toolkit_version (void);
  587. /*
  588. * Gets the current version of ATK
  589. */
  590. -G_CONST_RETURN gchar *atk_get_version (void);
  591. +const gchar *atk_get_version (void);
  592. /* --- GType boilerplate --- */
  593. /* convenience macros for atk type implementations, which for a type GtkGadgetAccessible will:
  594. Index: atk-1.33.6/tests/testrelation.c
  595. ===================================================================
  596. --- atk-1.33.6.orig/tests/testrelation.c
  597. +++ atk-1.33.6/tests/testrelation.c
  598. @@ -28,7 +28,7 @@
  599. test_relation (void)
  600. {
  601. AtkRelationType type1, type2;
  602. - G_CONST_RETURN gchar *name;
  603. + const gchar *name;
  604. AtkObject *obj;
  605. gboolean ret_value;
  606. AtkRelationSet *set;
  607. @@ -169,7 +169,7 @@
  608. test_role (void)
  609. {
  610. AtkRole role1, role2;
  611. - G_CONST_RETURN gchar *name;
  612. + const gchar *name;
  613. name = atk_role_get_name (ATK_ROLE_PAGE_TAB);
  614. g_return_val_if_fail (name, FALSE);
  615. @@ -230,7 +230,7 @@
  616. test_text_attr (void)
  617. {
  618. AtkTextAttribute attr1, attr2;
  619. - G_CONST_RETURN gchar *name;
  620. + const gchar *name;
  621. name = atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP);
  622. g_return_val_if_fail (name, FALSE);
  623. Index: atk-1.33.6/tests/teststateset.c
  624. ===================================================================
  625. --- atk-1.33.6.orig/tests/teststateset.c
  626. +++ atk-1.33.6/tests/teststateset.c
  627. @@ -208,7 +208,7 @@
  628. test_state (void)
  629. {
  630. AtkStateType type1, type2;
  631. - G_CONST_RETURN gchar *name;
  632. + const gchar *name;
  633. name = atk_state_type_get_name (ATK_STATE_VISIBLE);
  634. g_return_val_if_fail (name, FALSE);