On Thu, Mar 01, 2007 at 09:25:54AM +0000, Mark McLoughlin wrote:
Hi Rich,
On Wed, 2007-02-28 at 17:33 +0000, Richard W.M. Jones wrote:
> +#define virConfNew() (_virConfNew())
I wouldn't bother doing this, it just adds confusion - e.g. it helps to
know that the symbol is private from the calling site too, so just use
_virConfNew() everywhere ...
The libvirtd or other in-tree code doesn't really care about this - any
in-tree code is fair game for use really. The distinction public/private
is only relevant to out-of-tree code. None of the other in-tree private
code has an underscore, so I don't see any real benefit to making all the
in-tree code prefix an underscore on these symbols.
So I'm inclined to just apply Rich's patch as is, since its the minimal
change which makes it clear to out-of-tree people this is private, while
not impacting in-tree code.
Also suggest surrounding everything with:
#ifdef LIBVIRT_PRIVATE_API_DO_NOT_USE
in src/conf.h (even though it's not installed) so that people have no
excuse if they use this ...
I think that's overkill - we're not installing src/conf.h into the
/usr/include, so its merely going to clutter up the libvirt codebase.
Having an _ on the symbol name & not listing them in any public
header file is already making it clear enough that these are not for
public use.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules:
http://search.cpan.org/~danberr/ -=|
|=- Projects:
http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|