[Libosinfo] [PATCH] Drop redundant 'const' keyword from object parameters

Daniel P. Berrange berrange at redhat.com
Fri Nov 17 11:19:37 UTC 2017


On Fri, Nov 17, 2017 at 12:05:57PM +0100, Zeeshan Ali wrote:
> On Fri, Nov 17, 2017 at 11:57 AM, Christophe Fergeau
> <cfergeau at redhat.com> wrote:
> > Hey,
> >
> >> > It's definitely not used consistently, but removing a 'const' from
> >> > external API is going to cause breakage in C++ code:
> >>
> >> Well that's true but IMHO this breakage is OK, given:
> >>
> >> * the unlikelyhood of an existing C++ project using libosinfo.
> >
> > This patch would fix generation of rust bindings, which have 0 users
> > for sure at the moment since it's broken. So there are at least as many
> > C++ projects using libosinfo, maybe more :)
> 
> It's true that Rust bindings are my main motivation here but it's not
> the only reason. I did mention consistency too, although that alone
> isn't enough of a justification for this small fix. Having said that,
> at least there are Rust bindings for libosinfo but I couldn't find any
> C++ bindings so I'm pretty sure there is no existing project using
> libosinfo and it will be pretty safe to break this API for C++ right
> now.

NB, there's no need for C++ bindings in general. C++ code can trivially
call directly into C APIs. Someone would only create bindings if they
absolutely wanted libosinfo objects to be proper C++ classes.

That said, I still agree that I doubt there's any C++ users out there,
because I've never heard of anyone in the virt space using C++ :-)

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the Libosinfo mailing list