[pango/test-coverage: 6/15] utils: Make pango_version_check more precise




commit e47f645f8698c7ca3f9f89058c58c429e1b2b863
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 26 22:21:02 2021 -0400

    utils: Make pango_version_check more precise
    
    The expectation of version comparisons is that major
    versions have to match exactly.

 pango/pango-utils.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 0057859e..c90b4c86 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -127,6 +127,8 @@ pango_version_check (int required_major,
   gint pango_effective_micro = 100 * PANGO_VERSION_MINOR + PANGO_VERSION_MICRO;
   gint required_effective_micro = 100 * required_minor + required_micro;
 
+  if (required_major > PANGO_VERSION_MAJOR)
+    return "Pango version too old (major mismatch)";
   if (required_major < PANGO_VERSION_MAJOR)
     return "Pango version too new (major mismatch)";
   if (required_effective_micro < pango_effective_micro - PANGO_BINARY_AGE)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]