[pacman-dev] [11] library symbols naming

Aurelien Foret aurelien at archlinux.org
Tue Feb 7 13:58:57 EST 2006

VMiklos wrote:
>> [11] library symbols naming
>> prepends private functions with "_alpm_"
>> => it should be done as the last step before a first release to avoid 
>> introducing too much changes to the CVS code at once.
> hmm. you mean _every_ function that is not declared in alpm.h?

Excepted static ones, yes.

The library and the frontend are sharing the same namespace, so that 
symbol conflicts can arise.
Pre-pending function names with a common prefix ("_alpm_" or just "_") 
helps to avoid such conflicts.

This is all but mandatory, but it is usually a good practice.

I've already done it to some extent in the past (see list.h or util.h) 
for the most common function names which are more likely to be defined 
in the frontend.

It makes sense to me to extend it to all internal functions.

More information about the pacman-dev mailing list