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

Re: Any idea why public function like "svn_fspath__dirname" have double "__" in its name?

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Wed, 05 Jan 2011 11:16:44 -0500

On 01/05/2011 11:05 AM, Kamesh Jayachandran wrote:
>
>>> With regards
>>> Kamesh Jayachandran
>>>
>>> [PS] Unless I am mistaken svn_fspath__* can be used in libsvn_repos
>>> too instead of svn_path_* wherever applicable and hence a chance to
>>> become public.
>> I don't quite understand what you mean here.
>
>
> I meant subversion/libsvn_repos/commit.c:delete_entry() uses deprecated
> svn_path_join which can be made to use svn_fspath__join.
>
> If my guess is true, we can as well make svn_fspath__join as svn_fspath_join
> and make it public as it is used by 2 modules(libsvn_fs and libsvn_repos).

Our public API is no longer defined by "what needs to be used by more than
one module". It's defined by "what functionality is required by or believed
to be generally useful to third-party consumers of our libraries".

Sometimes a function is used only inside a single module. We keep it
module-private in that case.

Sometimes a function is used by multiple modules, but isn't of any general
utility to third-party consumers. We put it into include/private, so our
own modules can use it, but it isn't part of our published public API (which
has versioning promises and guarantees, etc.). (The svn_fspath__* functions
might very well be examples of such functions.)

And sometimes a function is used by one or more modules, but is clearly
useful to third-party consumers of the Subversion libraries. Those
functions live in include/ proper, and make up our public API.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2011-01-05 17:17:25 CET

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.