diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-21 12:32:34 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-29 10:38:32 +0100 |
commit | 02caf8c82e59afb88d45c8c25f66771224ed5ab3 (patch) | |
tree | 35640ca0e804967ff64547b398168783b6677511 /giscanner | |
parent | b03e687287433c0fa57910d8f8e2ffa2d2e3fdc5 (diff) | |
download | gobject-introspection-02caf8c82e59afb88d45c8c25f66771224ed5ab3.tar.gz |
scanner: make using bool without stdbool include work again. Fixes #247
Backport of !116
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/scannerlexer.l | 1 | ||||
-rw-r--r-- | giscanner/transformer.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l index 543edb30..c63b56d1 100644 --- a/giscanner/scannerlexer.l +++ b/giscanner/scannerlexer.l @@ -183,6 +183,7 @@ stringtext ([^\\\"])|(\\.) "__volatile" { return VOLATILE; } "__volatile__" { return VOLATILE; } "_Bool" { return BASIC_TYPE; } +"bool" { return BASIC_TYPE; } "typedef char __static_assert_t".*"\n" { ++lineno; /* Ignore */ } "__cdecl" { /* Ignore */ } "__declspec(deprecated(".*"))" { /* Ignore */ } diff --git a/giscanner/transformer.py b/giscanner/transformer.py index 335e229f..200470d7 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -702,7 +702,7 @@ raise ValueError.""" # because of different ABI, but this usually works fine, # so for backward compatibility lets continue for now: # https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/24#note_92792 - if canonical == '_Bool': + if canonical in ('_Bool', 'bool'): canonical = 'gboolean' base = canonical |