On Wed, Oct 29, 2008 at 11:44:31AM +0000, Daniel P. Berrange wrote:
This patch moves the definition for virRaiseError/virReportError out
of
the internal.h file, and into a newly created virterror.h file, to match
Hum, i was looking at this, yes using a new haeader makes sense,
I will also move the libvirt error initialization to virterror.c
But the problem is that we already have a virterror.h header which
is the public one, I think adding a second one internally with the same
name is a recipe for confusion. Let's name the internal one error.h
(or virt_error.h) but not the same.
naming of the virterror.c file where the implementation lives. Most
code has to be updated to include virterror.h. This patch also drops the
leading __ prefix on these two functions - it was pointless, since we never
export it from the .so, not even for libvirtd use.
The motivation for this change is to get clarity over our modularization.
Every file in our source tree ultimately includes internal.h, but not
everything is linking to the virterror.c file which includes the impl of
virRaiseError. So it is good to avoid defining functions in header files
which aren't available to those including the header.
I think the name clash between the private and public header is more
problematic than having a slightly different name for the .c and .h
virterror.c implements the entry points for the public header
virterror.h, like libvirt.c implements the entry points for the public
header libvirt.h . having a second internel error header separate
from internal.h is fine but we should just avoid the name clash.
+1 for renaming to error.h or virt_error.h
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/