Closed tintou closed 3 years ago
I wonder: Are there any integer comparisons made with this variable? Because 0.14 < 0.9
- for this reason, libappstream uses an enum for this, so you can still easily check whether the current target API version is > a tested version.
If there's no direct comparisons made with this definition, this change is fine.
Hmm, indeed there is indirectly here: https://github.com/hughsie/appstream-glib/blob/6d6b8f488e4cd072818af037978e44fe61bf3415/libappstream-glib/as-app.c#L4834 that compares it.
@tintou could you do a PR to change that comparison to use as_utils_vercmp() please. Thanks!
@hughsie AS_API_VERSION_NEWEST
would need to become a string constant then - is this API exported anywhere? Libappstream "cheats" an uses an enum for this ^^ ( https://github.com/ximion/appstream/blob/master/src/as-context.h#L49 )
We are now in version 0.14
Closes #406
Signed-off-by: Corentin Noël corentin.noel@collabora.com