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

Add private include area for Subversion-private APIs used between modules

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-08-05 00:03:37 CEST

On Fri, 04 Aug 2006, Branko Čibej wrote:

> Garrett Rooney wrote:
> > On 8/4/06, Branko Čibej <brane@xbc.nu> wrote:
> >> Vlad Georgescu wrote:
> >> > [[[
> >> > Extract the atomic initialization code from libsvn_fs_base/bdb/env.c
> >> > and convert
> >> > it to a generic implementation that can be used to initialize other
> >> > libraries
> >> > (*cough* Cyrus SASL *cough*). Make bdb use the new implementation.
> >> >
> >> > * subversion/include/svn_atomic.h: New file.
> >> >
> >> > * subversion/libsvn_subr/atomic.c: New file.
> >> >
> >> > * subversion/libsvn_fs_base/bdb/env.c
> >> > Include svn_atomic.h instead of apr_atomic.h.
> >> > (svn__atomic_t,
> >> > svn__atomic_read,
> >> > svn__atomic_set,
> >> > svn__atomic_cas): These are now in subversion/include/svn_atomic.h
> >> > and have a single underscore. All calls were changed to reflect this.
> >> > (BDB_CACHE_UNINITIALIZED,
> >> > BDB_CACHE_START_INIT,
> >> > BDB_CACHE_INIT_FAILED,
> >> > BDB_CACHE_INITIALIZED): Deleted. Similar definitions are now in
> >> > svn_atomic.h.
> >> I cannot for the life of me imagine why these definitions should be part
> >> of Subversion's public API. In fact, they shouldn't be. They should
> >> either go into svn_private_config.h, or, if that's not appropriate
> >> (being a generated header), we should introduce a new _private_ header
> >> for them.
> >>
> >> -1 on putting them in include/svn_atomic.h, they have no use outside the
> >> library implementation.
> >
> > Perhaps a new subversion/include/private directory for such things is
> > in order, for headers that are used in various libraries but should
> > not be installed. That would be somewhat nicer than the current
> > practice of doing something like:
> >
> > #include "../libsvn_subr/atomics.h"

+1! Inter-module APIs aren't necessarily always public. Introduction
of a private include area (APR/APR-Util do something similar) would
allow us with a clear way to share non-public APIs.

  • application/pgp-signature attachment: stored
Received on Sat Aug 5 00:03:52 2006

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.