projects
/
platform
/
upstream
/
gobject-introspection.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d0ccda
)
Silently skip #pragma directives when scanning sources.
author
Pavel Holejsovsky
<pavel.holejsovsky@gmail.com>
Thu, 30 Sep 2010 09:38:55 +0000
(11:38 +0200)
committer
Johan Dahlin
<johan@gnome.org>
Sun, 3 Oct 2010 13:03:59 +0000
(10:03 -0300)
This is useful e.g. on cygwin, where system headers use #pragma directives,
causing annoying false-alarm errors during every g-ir-scanner run.
https://bugzilla.gnome.org/show_bug.cgi?id=630994
giscanner/scannerlexer.l
patch
|
blob
|
history
diff --git
a/giscanner/scannerlexer.l
b/giscanner/scannerlexer.l
index 5b68ca050882bd93663265408515f22de9dae8e9..e06bc85d0d0241cfd28090cbd92af2c7a4b0b8f9 100644
(file)
--- a/
giscanner/scannerlexer.l
+++ b/
giscanner/scannerlexer.l
@@
-78,6
+78,7
@@
stringtext ([^\\\"])|(\\.)
"#define "[a-zA-Z_][a-zA-Z_0-9]*"(" { yyless (yyleng - 1); return FUNCTION_MACRO; }
"#define "[a-zA-Z_][a-zA-Z_0-9]* { return OBJECT_MACRO; }
+"#pragma ".*"\n" { /* Ignore pragma. */ }
"# "[0-9]+" ".*"\n" { process_linemarks(scanner); }
"#" { }