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

Zeeshan Ali zeeshan at kinvolk.io
Fri Nov 17 11:05:57 UTC 2017


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.

But again, that's my opinion.

> If the breakage is fixed in the Rust binding generator soon, I'd rather
> we drop this patch.

We'll see, it's not very simple IIUC.

---

Zeeshan Ali
Kinvolk GmbH
Adalbertstr.6a, 10999 Berlin




More information about the Libosinfo mailing list