summaryrefslogtreecommitdiff
path: root/giscanner/sourcescanner.py
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-12-06 09:01:02 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2018-12-06 09:57:58 +0000
commit953b45b14e2749be239ff3fdb0040998106d6758 (patch)
treee9a988226cbe56f8bee67734327c18e3fb3e7bda /giscanner/sourcescanner.py
parentaaa7af50f98771efc8172c5dff7a898feda8c423 (diff)
downloadgobject-introspection-953b45b14e2749be239ff3fdb0040998106d6758.tar.gz
gi_source_scanner_parse_file: use a filename instead of a FILE struct
This allows us to get rid of the msvc hacks which are needed in case Python is built with a different msvc than g-i. By passing a filename the FILE struct never passes over library boundaries.
Diffstat (limited to 'giscanner/sourcescanner.py')
-rw-r--r--giscanner/sourcescanner.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py
index aea05e65..d867a4e9 100644
--- a/giscanner/sourcescanner.py
+++ b/giscanner/sourcescanner.py
@@ -307,10 +307,7 @@ class SourceScanner(object):
self._cpp_options)
os.unlink(tmp_name_cpp)
- fp = open(tmpfile_output, 'r')
-
- self._scanner.parse_file(fp.fileno())
- fp.close()
+ self._scanner.parse_file(tmpfile_output)
os.unlink(tmpfile_output)
def _write_preprocess_src(self, fp, defines, undefs, filenames):