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 687742 - Add support for internal linkage to glib-compile-resources
Add support for internal linkage to glib-compile-resources
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.34.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-11-06 10:45 UTC by Yeti
Modified: 2012-11-10 03:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (3.34 KB, patch)
2012-11-06 10:45 UTC, Yeti
reviewed Details | Review
patch with documentation (4.21 KB, patch)
2012-11-08 15:36 UTC, Yeti
accepted-commit_now Details | Review

Description Yeti 2012-11-06 10:45:17 UTC
Created attachment 228232 [details] [review]
patch

glib-compile-resources declares generated functions explicitly `extern'.  So the functions can have an underscore prefix and all but, unless a link script or similar means are used, they are exported from the library and need PLT entries.  I am not sure why anyone would want that but I assume some use cases exist for exporting functions that are meant to be used only internally because it was implemented this way.

So I suggest adding an option --internal to glib-compile-resources that would result in functions being declared G_GNUC_INTERNAL instead of extern.

Implementation is provided.
Comment 1 Matthias Clasen 2012-11-07 22:37:23 UTC
Review of attachment 228232 [details] [review]:

Idea looks fine to me, but the patch also needs to update glib/docs/reference/gio/glib-compile-resources.xml to document the new option.
Comment 2 Yeti 2012-11-08 15:36:19 UTC
Created attachment 228480 [details] [review]
patch with documentation

Documentation added.
Comment 3 Matthias Clasen 2012-11-09 23:22:29 UTC
Review of attachment 228480 [details] [review]:

Looks fine to me