After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 652205 - Use const instead G_CONST_RETURN
Use const instead G_CONST_RETURN
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: atk
1.33.x
Other Linux
: Normal normal
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks: 644611
 
 
Reported: 2011-06-09 15:47 UTC by Javier Jardón (IRC: jjardon)
Modified: 2011-06-13 10:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test: do not use G_CONST_RETURN (1.55 KB, patch)
2011-06-09 15:49 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review
atk: Do not use G_CONST_RETURN (27.61 KB, patch)
2011-06-09 15:50 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review

Description Javier Jardón (IRC: jjardon) 2011-06-09 15:47:14 UTC
The macro will be deprecated soon. See bug #644611
Comment 1 Javier Jardón (IRC: jjardon) 2011-06-09 15:49:34 UTC
Created attachment 189558 [details] [review]
test: do not use G_CONST_RETURN
Comment 2 Javier Jardón (IRC: jjardon) 2011-06-09 15:50:14 UTC
Created attachment 189559 [details] [review]
atk: Do not use G_CONST_RETURN
Comment 3 Alejandro Piñeiro Iglesias (IRC: infapi00) 2011-06-09 16:25:14 UTC
I have tried it and seems to work.

Anyway, on bug 652005 comment 8 and comment 9 Matthias says that it is not clear what to do on the public APIs. Your two patches also modified the public APIs. So I would like to wait for that conclusion.
Comment 4 Matthias Clasen 2011-06-10 01:57:28 UTC
Subsequent irc discussion has convinced me that we should really do this.
Comment 5 Alejandro Piñeiro Iglesias (IRC: infapi00) 2011-06-10 10:13:25 UTC
Review of attachment 189559 [details] [review]:

::: atk/atkdocument.h
@@ +70,3 @@
 
+const gchar*          atk_document_get_document_type (AtkDocument   *document);
+gpointer              atk_document_get_document (AtkDocument   *document);

Just a nitpick: you modify also this line, although it is not related at all with the G_CONST_RETURN -> const move, is just cleaning the indentation, so not related with this bug.

Could you change this? There are other places on the patch with this "indentation changes".
Comment 6 Alejandro Piñeiro Iglesias (IRC: infapi00) 2011-06-10 10:14:59 UTC
Well, my first plan was waiting for Li bless. Anyway, taking into account that G_CONST_RETURN will be deprecated, and that it is already being applied on other modules (ie: gtk), I think that this wouldn't be a problem.

So, modify the second patch in order to be "just a G_CONST_RETURN -> const" change, and apply it.

Thanks.
Comment 7 Javier Jardón (IRC: jjardon) 2011-06-13 10:53:10 UTC
Comment on attachment 189558 [details] [review]
test: do not use G_CONST_RETURN

commit 28ca51e39e84ee280e4352e752593d77810b1ba8
Comment 8 Javier Jardón (IRC: jjardon) 2011-06-13 10:54:05 UTC
Comment on attachment 189559 [details] [review]
atk: Do not use G_CONST_RETURN

Sorry for the delay. Committeed with the required changes ;)

commit 2b6504ef3a8eb22b4d00c933e041fe2e1423142a