From 7b9e23f28b2bf0540a2c49914f5d9c89079c96ba Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 10 Feb 2021 23:37:43 +0200 Subject: [PATCH] [introspection] Fix g-ir-scanner syntax errors Fixes https://github.com/harfbuzz/harfbuzz/issues/2851 --- src/Makefile.am | 9 +-------- src/hb-aat-layout.h | 2 +- src/hb-blob.h | 2 +- src/hb-buffer.h | 2 +- src/hb-common.h | 2 +- src/hb-deprecated.h | 2 +- src/hb-draw.h | 2 +- src/hb-face.h | 2 +- src/hb-font.h | 2 +- src/hb-gobject-enums.h.tmpl | 2 +- src/hb-gobject-structs.h | 2 +- src/hb-map.h | 2 +- src/hb-ot-color.h | 2 +- src/hb-ot-deprecated.h | 2 +- src/hb-ot-font.h | 2 +- src/hb-ot-layout.h | 2 +- src/hb-ot-math.h | 2 +- src/hb-ot-meta.h | 2 +- src/hb-ot-metrics.h | 2 +- src/hb-ot-name.h | 2 +- src/hb-ot-shape.h | 2 +- src/hb-ot-var.h | 2 +- src/hb-set.h | 2 +- src/hb-shape-plan.h | 2 +- src/hb-shape.h | 2 +- src/hb-style.h | 2 +- src/hb-unicode.h | 2 +- src/hb-version.h | 2 +- src/hb-version.h.in | 2 +- src/meson.build | 10 ++-------- 30 files changed, 31 insertions(+), 44 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 340765402..7ae881c38 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -425,14 +425,7 @@ HarfBuzz_0_0_gir_INCLUDES = GObject-2.0 HarfBuzz_0_0_gir_CFLAGS = \ $(INCLUDES) \ $(HBCFLAGS) \ - -DHB_H \ - -DHB_H_IN \ - -DHB_OT_H \ - -DHB_OT_H_IN \ - -DHB_AAT_H \ - -DHB_AAT_H_IN \ - -DHB_GOBJECT_H \ - -DHB_GOBJECT_H_IN \ + -DHB_NO_SINGLE_HEADER_ERROR \ -DHAVE_GOBJECT \ -DHB_EXTERN= \ $(NULL) diff --git a/src/hb-aat-layout.h b/src/hb-aat-layout.h index 292459044..9af274008 100644 --- a/src/hb-aat-layout.h +++ b/src/hb-aat-layout.h @@ -22,7 +22,7 @@ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ -#ifndef HB_AAT_H_IN +#if !defined(HB_AAT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-blob.h b/src/hb-blob.h index 74e923d49..86f12788d 100644 --- a/src/hb-blob.h +++ b/src/hb-blob.h @@ -24,7 +24,7 @@ * Red Hat Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-buffer.h b/src/hb-buffer.h index 869b6a50c..865ccb227 100644 --- a/src/hb-buffer.h +++ b/src/hb-buffer.h @@ -27,7 +27,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-common.h b/src/hb-common.h index 80c82178a..532fd428c 100644 --- a/src/hb-common.h +++ b/src/hb-common.h @@ -26,7 +26,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-deprecated.h b/src/hb-deprecated.h index d0cae4bea..5f1912578 100644 --- a/src/hb-deprecated.h +++ b/src/hb-deprecated.h @@ -24,7 +24,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-draw.h b/src/hb-draw.h index 98eccf4c0..bddc87639 100644 --- a/src/hb-draw.h +++ b/src/hb-draw.h @@ -22,7 +22,7 @@ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-face.h b/src/hb-face.h index dc9185cff..6ef2f8b88 100644 --- a/src/hb-face.h +++ b/src/hb-face.h @@ -24,7 +24,7 @@ * Red Hat Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-font.h b/src/hb-font.h index 231a40216..15dc12652 100644 --- a/src/hb-font.h +++ b/src/hb-font.h @@ -24,7 +24,7 @@ * Red Hat Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-gobject-enums.h.tmpl b/src/hb-gobject-enums.h.tmpl index f8bd29e54..a8467868b 100644 --- a/src/hb-gobject-enums.h.tmpl +++ b/src/hb-gobject-enums.h.tmpl @@ -25,7 +25,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_GOBJECT_H_IN +#if !defined(HB_GOBJECT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-gobject-structs.h b/src/hb-gobject-structs.h index 9a6c6d855..63467f80d 100644 --- a/src/hb-gobject-structs.h +++ b/src/hb-gobject-structs.h @@ -24,7 +24,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_GOBJECT_H_IN +#if !defined(HB_GOBJECT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-map.h b/src/hb-map.h index a2d2d0ba0..6a45a7bdd 100644 --- a/src/hb-map.h +++ b/src/hb-map.h @@ -24,7 +24,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-ot-color.h b/src/hb-ot-color.h index 5aa93ba19..c23ce4de4 100644 --- a/src/hb-ot-color.h +++ b/src/hb-ot-color.h @@ -26,7 +26,7 @@ * Google Author(s): Sascha Brawer, Behdad Esfahbod */ -#ifndef HB_OT_H_IN +#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-ot-deprecated.h b/src/hb-ot-deprecated.h index 38ee2c0c8..ce6b6fef1 100644 --- a/src/hb-ot-deprecated.h +++ b/src/hb-ot-deprecated.h @@ -24,7 +24,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_OT_H_IN +#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-ot-font.h b/src/hb-ot-font.h index 80eaa54b1..e7959d1ae 100644 --- a/src/hb-ot-font.h +++ b/src/hb-ot-font.h @@ -24,7 +24,7 @@ * Google Author(s): Behdad Esfahbod, Roozbeh Pournader */ -#ifndef HB_OT_H_IN +#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-ot-layout.h b/src/hb-ot-layout.h index e5e5470a3..d47ba0fc9 100644 --- a/src/hb-ot-layout.h +++ b/src/hb-ot-layout.h @@ -24,7 +24,7 @@ * Red Hat Author(s): Behdad Esfahbod */ -#ifndef HB_OT_H_IN +#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-ot-math.h b/src/hb-ot-math.h index eb8a3019b..d3ffa19d8 100644 --- a/src/hb-ot-math.h +++ b/src/hb-ot-math.h @@ -24,7 +24,7 @@ * Igalia Author(s): Frédéric Wang */ -#ifndef HB_OT_H_IN +#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-ot-meta.h b/src/hb-ot-meta.h index 5377ec0a0..7748eb495 100644 --- a/src/hb-ot-meta.h +++ b/src/hb-ot-meta.h @@ -22,7 +22,7 @@ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ -#ifndef HB_OT_H_IN +#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-ot-metrics.h b/src/hb-ot-metrics.h index 2bdb6875a..5841fc8b0 100644 --- a/src/hb-ot-metrics.h +++ b/src/hb-ot-metrics.h @@ -22,7 +22,7 @@ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ -#ifndef HB_OT_H_IN +#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-ot-name.h b/src/hb-ot-name.h index 6f3fcd242..9359014c8 100644 --- a/src/hb-ot-name.h +++ b/src/hb-ot-name.h @@ -22,7 +22,7 @@ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ -#ifndef HB_OT_H_IN +#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-ot-shape.h b/src/hb-ot-shape.h index 7b1bcc063..afdff7283 100644 --- a/src/hb-ot-shape.h +++ b/src/hb-ot-shape.h @@ -24,7 +24,7 @@ * Red Hat Author(s): Behdad Esfahbod */ -#ifndef HB_OT_H_IN +#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-ot-var.h b/src/hb-ot-var.h index da85dd21e..ce201d3b4 100644 --- a/src/hb-ot-var.h +++ b/src/hb-ot-var.h @@ -24,7 +24,7 @@ * Red Hat Author(s): Behdad Esfahbod */ -#ifndef HB_OT_H_IN +#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-set.h b/src/hb-set.h index 36a8681bf..0ad27f4bb 100644 --- a/src/hb-set.h +++ b/src/hb-set.h @@ -24,7 +24,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-shape-plan.h b/src/hb-shape-plan.h index 336524ee2..fc7c04189 100644 --- a/src/hb-shape-plan.h +++ b/src/hb-shape-plan.h @@ -24,7 +24,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-shape.h b/src/hb-shape.h index 39507ff74..922f8c011 100644 --- a/src/hb-shape.h +++ b/src/hb-shape.h @@ -26,7 +26,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-style.h b/src/hb-style.h index 1209c79e9..f5776cee5 100644 --- a/src/hb-style.h +++ b/src/hb-style.h @@ -22,7 +22,7 @@ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-unicode.h b/src/hb-unicode.h index f1f857343..c04ee15a0 100644 --- a/src/hb-unicode.h +++ b/src/hb-unicode.h @@ -28,7 +28,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-version.h b/src/hb-version.h index 30d0252b6..423339eda 100644 --- a/src/hb-version.h +++ b/src/hb-version.h @@ -24,7 +24,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/hb-version.h.in b/src/hb-version.h.in index d9c95eba7..abcb73f41 100644 --- a/src/hb-version.h.in +++ b/src/hb-version.h.in @@ -24,7 +24,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_H_IN +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) #error "Include instead." #endif diff --git a/src/meson.build b/src/meson.build index 917342124..ec3b7c718 100644 --- a/src/meson.build +++ b/src/meson.build @@ -640,14 +640,8 @@ if have_gobject header: 'hb-gobject.h', install: true, extra_args: ['--cflags-begin', - '-DHB_H', - '-DHB_H_IN', - '-DHB_OT_H', - '-DHB_OT_H_IN', - '-DHB_AAT_H', - '-DHB_AAT_H_IN', - '-DHB_GOBJECT_H', - '-DHB_GOBJECT_H_IN', + '-DHB_NO_SINGLE_HEADER_ERROR', + '-DHAVE_GOBJECT', '-DHB_EXTERN=', '--cflags-end']) endif