|
|||||||||||
|
cdebconf, frontends and namespaces
From: Jérémy Bobbio <lunar(at)debian.org>
Date: Tue Jul 31 2007 - 17:03:21 EDT
While working on the GTK+ frontend of cdebconf, I was a little bothered by an issue regarding namespace. I would like to get more opinions on that matter so we can decide how to handle it. cdebconf loads frontend by loading a shared object located at "<frontend_path>/<frontend_name>.so". The only exported symbol needed is "frontend_module" which is then used to lookup the relevant functions. Up to this point, the frontend is actually free to name its symbols whatever feels the best. Plugin handling is more restrictive though. Plugin shared objects are located at "<frontend_path>/<frontend>/plugin-<type>.so" and cdebconf looks for a specific symbol in the form "<frontend>_handler_<type>". As we usually name our frontends with the name of the library they are built on top (newt, gtk, bogl, etc.) this last requirements means you end up needing something like "gtk_handler_entropy". My personal coding tastes tell me that it's wrong, as the "gtk_" namespace is reserved for the GTK+ library. Possible solutions I can see to fix this:
This last option gets my preference. Although, for consistency, I would probably like to rename any exported frontend symbols to "fe_<frontend>" while doing that change. Any comments is more than welcome if you have an opinion. :) Cheers,
--
Jérémy Bobbio .''`.
lunar@debian.org : :Ⓐ : # apt-get install anarchism
`. `'`
`-
-- To UNSUBSCRIBE, email to debian-boot-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 18:04:12 EDT |
||||||||||
|
|||||||||||