[pango/gir-fixes: 1/2] Trick g-ir-scanner




commit 77105c6f02a5f06c95430dcb7dfd1dede3a52ffc
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Feb 15 21:59:09 2021 -0500

    Trick g-ir-scanner
    
    g-ir-scanner's handling of #defines is really rudimentary,
    so we have to trick it to pick up PANGO_ATTR_TO_TEXT_END
    as a constant with value 0, and then override the value
    with an annotation.
    
    See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/369

 pango/pango-attributes.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index dd38aee2..025a6e2e 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -267,16 +267,17 @@ typedef enum {
  *
  * Since: 1.24
  */
+#define PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING 0
+
 /**
- * PANGO_ATTR_INDEX_TO_TEXT_END:
+ * PANGO_ATTR_INDEX_TO_TEXT_END: (value 4294967295)
  *
  * This value can be used to set the end_index member of a #PangoAttribute
  * such that the attribute covers to the end of the text.
  *
  * Since: 1.24
  */
-#define PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING   0
-#define PANGO_ATTR_INDEX_TO_TEXT_END           G_MAXUINT
+#define PANGO_ATTR_INDEX_TO_TEXT_END (G_MAXUINT + 0)
 
 /**
  * PangoAttribute:


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