diff options
Diffstat (limited to 'test/gi/filter-scintilla-h.py')
-rw-r--r-- | test/gi/filter-scintilla-h.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/gi/filter-scintilla-h.py b/test/gi/filter-scintilla-h.py new file mode 100644 index 000000000..0743f9ef2 --- /dev/null +++ b/test/gi/filter-scintilla-h.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +# Filters Scintilla.h to not contain generated stuff or deprecated defines + +import sys +import fileinput + +def main(): + inhibit = 0 + for line in fileinput.input(): + if line.startswith("/* ++Autogenerated") or line.startswith("#ifdef INCLUDE_DEPRECATED_FEATURES"): + inhibit += 1 + if inhibit == 0: + sys.stdout.write(line) + if line.startswith("/* --Autogenerated") or line.startswith("#endif"): + if (inhibit > 0): + inhibit -= 1 + +if __name__ == "__main__": + main() |