[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: The meaning of double-underscore symbols

From: Joshua Varner <jlvarner_at_gmail.com>
Date: 2005-10-04 17:17:27 CEST

On 10/4/05, Max Bowsher <maxb@ukf.net> wrote:
> I don't believe we've ever defined *exactly* what the significance of a
> double-underscore symbol name is.
> Two of definitions I've heard of are:
> (a) anything that should not be used by users, but can we used at will
> internally by the Subversion libraries.
> (b) symbols that should have visibility only to the library that they are
> defined in, and should not be used *anywhere* outside that library.
> The double-underscore symbols which do not meet the strictest definition
> are:
> svn_error__locate: used almost everywhere
> svn_sort__hash: used by libsvn_client, mod_dav_svn, and svn
> svn_{fs,ra}_foo__init: linked into the loader libs
> svn_txdelta__apply_instructions, svn_txdelta__compose_windows: used by the
> fs backends
> If anyone knows of an official definition of what svn_foo__bar means, please
> tell me, otherwise, opinions and thoughts welcome, so we can craft an
> official definition.
Are you saying this section from
is incomplete or that is just hard to find? I believe this implies b.

Signify internal variables by two underscores after the prefix. That
is, when a symbol must (for technical reasons) reside in the global
namespace despite not being part of a published interface, then use
two underscores following the module prefix. For example:

         svn_fs_get_rev_prop () /* Part of published API. */
         svn_fs__parse_props () /* For internal use only. */


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 4 17:19:34 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.