Patch for Clearlooks Theme exporting symbols unneccesarily



Clearlooks gave me some headaches with our app (BMPx, http://bmpx.beep-media-player.org), as it exports symbols quite into the wild which is completely unneccesary and can cause collisions with applications, and in our case did so.

For exmple, our app has a drawing function draw_arrow () that uses Cairo to draw a certain kind of arrow, and Clearlooks had a symbol of the same name exported publicly up to at least 0.6.2 (in CVS it's renamed to clearlooks_draw_arrow(), but it's still public never the less).

Just in case the discussion arises: You always run N (distinct) apps versus 1 style engine, but 1 (identical) style engine versus N (distinct) apps. So you could argue we should prefix our function as well, and it might be a good idea probably in case some other lib has a symbol of this name. However, theme engines don't need to export any symbols except the GTypeModule stuff and the GType registration for the style and rc_style.

So please find here attached a patch against clearlooks-cvs from the gtk-engines module in GNOME CVS from roughly Fri Jan  6 07:43:20 CET 2006 which keeps all symbols unneccessary G_GNUC_INTERNAL,  plus the needed clearlooks.sym file (to be put into gtk-engines/engines/clearlooks) which lists only the neccesary symbols to be exported.

(The G_GNUC_INTERNAL prefixing isn't complete, it doesn't cover support.c yet, but the .sym file should cover hiding these symbols as well)

Regards,
Milosz

Attachment: clearlooks-symbols-internalize-1.diff.gz
Description: GNU Zip compressed data

Attachment: clearlooks.sym
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]