[pango/gi-docs] Trick g-ir-scanner
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/gi-docs] Trick g-ir-scanner
- Date: Tue, 16 Feb 2021 03:17:58 +0000 (UTC)
commit 9f65438d474696218d83f522904157a2cc4dd330
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 67081625..3013d379 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -268,8 +268,10 @@ 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
@@ -277,8 +279,7 @@ typedef enum {
*
* 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]