RFC: namespaces

Dag-Erling Smørgrav des at linpro.no
Mon Feb 27 11:01:57 CET 2006


Varnish is going to consist of quite a bit of code, and I'd like to
keep separate modules in separate namespaces.  I'd like to suggest the
following convention:

 - All external symbols get a three-letter prefix followed by an
   underscore.

 - The first letter is always v for Varnish.

 - The next two letters identify the module the symbol belongs to.
   Each module gets a unique two-letter mnemonic code.

For instance we could assign the two-letter code "lo" to the logger;
logging functions would be named e.g. vlo_emit(), and log-related
preprocessor macros would be named e.g. VLO_LEVEL_DEBUG.

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no



More information about the varnish-dev mailing list