[Libvir] [PATCH] export virConf* symbols (second version)

Daniel P. Berrange berrange at redhat.com
Thu Mar 8 13:40:07 UTC 2007

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:
> 	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.

|=- 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  -=| 

More information about the libvir-list mailing list