Blame SOURCES/0001-scangobj-Make-G_MAXINT-appear-as-such-on-32-bit.patch

c7a88b
From 12f8e2014309403afc3bceabcea5e38b29fe5447 Mon Sep 17 00:00:00 2001
c7a88b
From: Bastien Nocera <hadess@hadess.net>
c7a88b
Date: Tue, 4 Sep 2018 09:50:15 +0200
c7a88b
Subject: [PATCH] scangobj: Make G_MAXINT appear as such on 32-bit
c7a88b
c7a88b
Don't overwrite the boundaries of integer properties when they match
c7a88b
both G_MAXINT and G_MAXLONG. This also fixes a memory leak in the
c7a88b
generated scanobj code.
c7a88b
c7a88b
Closes: #49
c7a88b
---
c7a88b
 gtkdoc/scangobj.py | 10 ++++++----
c7a88b
 1 file changed, 6 insertions(+), 4 deletions(-)
c7a88b
c7a88b
diff --git a/gtkdoc/scangobj.py b/gtkdoc/scangobj.py
c7a88b
index 237863c..73c23b0 100644
c7a88b
--- a/gtkdoc/scangobj.py
c7a88b
+++ b/gtkdoc/scangobj.py
c7a88b
@@ -690,10 +690,12 @@ describe_unsigned_constant (gsize size, guint64 value)
c7a88b
         else if (value == G_MAXUINT)
c7a88b
           desc = g_strdup ("G_MAXUINT");
c7a88b
       }
c7a88b
-      if (value == (guint64)G_MAXLONG)
c7a88b
-        desc = g_strdup ("G_MAXLONG");
c7a88b
-      else if (value == G_MAXULONG)
c7a88b
-        desc = g_strdup ("G_MAXULONG");
c7a88b
+      if (desc == NULL) {
c7a88b
+        if (value == (guint64)G_MAXLONG)
c7a88b
+          desc = g_strdup ("G_MAXLONG");
c7a88b
+        else if (value == G_MAXULONG)
c7a88b
+          desc = g_strdup ("G_MAXULONG");
c7a88b
+      }
c7a88b
       break;
c7a88b
     case 8:
c7a88b
       if (value == G_MAXINT64)
c7a88b
-- 
c7a88b
2.29.2
c7a88b