summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2018-11-05 15:42:01 +0000
committerChristoph Reiter <reiter.christoph@gmail.com>2018-11-05 19:49:02 +0100
commit5a23af1517c377cf0282f65492315f932c3c31b8 (patch)
treec0e0e5c76eb2f8c6b6eebc03bc1a9b99e4398ae8
parent1f1dd7f4857c13db507ad663664a5e4b8d620ffc (diff)
downloadgobject-introspection-5a23af1517c377cf0282f65492315f932c3c31b8.tar.gz
scanner: Parse __typeof__ and discard it
GLib 2.57.2 introduced __typeof__ in g_clear_pointer, which the scanner failed to parse. Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/328
-rw-r--r--giscanner/scannerlexer.l1
1 files changed, 1 insertions, 0 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index 2f45b66d..6e2796ab 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -177,6 +177,7 @@ stringtext ([^\\\"])|(\\.)
"__restrict__" { return RESTRICT; }
"thread_local" { return THREAD_LOCAL; }
"_Thread_local" { return THREAD_LOCAL; }
+"__typeof__" { if (!parse_ignored_macro()) REJECT; }
"__typeof" { if (!parse_ignored_macro()) REJECT; }
"__volatile" { return VOLATILE; }
"__volatile__" { return VOLATILE; }