John Peacock <jpeacock@rowman.com> writes:
> That's not how I read this (from HACKING):
>
> * 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. */
>
> > If a function has two underscores ('svn_wc__foo_bar'), that means it
> > is shared among different files in that library. But when functions
> > are called from other libraries, then they're just public functions.
>
> Even though the paragraph above discusses variables, the examples are
> clearly functions, and they strongely suggest that the double
> underscore functions are not part of the public API (for compatibility
> purposes).
>
> If I have misunderstood, please enlighten me. Is the "published API"
> simply the collection of all functions defined in the .h files?
The public API is everthing in subversion/include/*.h.
The double__underscore functions are shared between multiple files *in
the same sublibrary*. See subversion/libsvn_wc/*.h, for example.
These can't be static functions, because they're needed by multiple
files in that library. However, we do not call them from other
libraries -- for example, libsvn_client/*.c never includes any of
libsvn_wc/*.h, and never calls any of the functions defined in those
.h files. It only calls things defined in include/svn_wc.h.
In other words, our libraries treat each other just like other
consumers, using only the public interfaces. What a library does
within itself is up to it.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 11 22:17:55 2004