[libvirt] [PATCH] Allow nwfilter functions to be compiled with C++

Unfortunately the NWFilter functions were outside of the "extern C { ... }" declaration in include/libvirt/libvirt.h.in, which means that they couldn't be properly used with C++. Move them inside of the braces, which should fix the problem. Signed-off-by: Chris Lalancette <clalance@redhat.com> --- include/libvirt/libvirt.h.in | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index d95d7ae..e6e4d0c 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -2213,10 +2213,6 @@ int virConnectDomainEventRegisterAny(virConnectPtr conn, int virConnectDomainEventDeregisterAny(virConnectPtr conn, int callbackID); -#ifdef __cplusplus -} -#endif - /** * virNWFilter: @@ -2280,4 +2276,8 @@ int virNWFilterGetUUIDString (virNWFilterPtr nwfilter, char * virNWFilterGetXMLDesc (virNWFilterPtr nwfilter, int flags); +#ifdef __cplusplus +} +#endif + #endif /* __VIR_VIRLIB_H__ */ -- 1.6.6.1

On 05/24/2010 02:24 PM, Chris Lalancette wrote:
Unfortunately the NWFilter functions were outside of the "extern C { ... }" declaration in include/libvirt/libvirt.h.in, which means that they couldn't be properly used with C++. Move them inside of the braces, which should fix the problem.
ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 05/24/2010 04:35 PM, Eric Blake wrote:
On 05/24/2010 02:24 PM, Chris Lalancette wrote:
Unfortunately the NWFilter functions were outside of the "extern C { ... }" declaration in include/libvirt/libvirt.h.in, which means that they couldn't be properly used with C++. Move them inside of the braces, which should fix the problem.
ACK.
Thanks, I pushed this. -- Chris Lalancette
participants (2)
-
Chris Lalancette
-
Eric Blake