summaryrefslogtreecommitdiff
path: root/giscanner/scannermain.py
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-09-07 09:52:54 -0400
committerColin Walters <walters@verbum.org>2010-09-07 10:22:23 -0400
commit4905b753cbad546875616eae13918eca539680c9 (patch)
treef251134c64683fadf1774d230e17056130b34c1f /giscanner/scannermain.py
parent2eb614e805311841e17fd4dbe76aa70443f3a911 (diff)
downloadgobject-introspection-4905b753cbad546875616eae13918eca539680c9.tar.gz
scanner: Add various static debug hooks in GI_SCANNER_DEBUG
For backwards compat, keep the presence of the environment variable at all to mean "exception". Also start a HACKING file.
Diffstat (limited to 'giscanner/scannermain.py')
-rw-r--r--giscanner/scannermain.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 42f74b7d..630acb6f 100644
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -40,7 +40,7 @@ from giscanner.maintransformer import MainTransformer
from giscanner.shlibs import resolve_shlibs
from giscanner.sourcescanner import SourceScanner
from giscanner.transformer import Transformer
-from giscanner.utils import files_are_identical
+from . import utils
def _get_option_parser():
parser = optparse.OptionParser('%prog [options] sources')
@@ -334,6 +334,8 @@ def scanner_main(args):
main = MainTransformer(transformer, blocks)
main.transform()
+ utils.break_on_debug_flag('tree')
+
final = IntrospectablePass(transformer)
final.validate()
@@ -362,7 +364,7 @@ def scanner_main(args):
temp_f = os.fdopen(temp_f, 'w')
passthrough_gir(main_f_name, temp_f)
temp_f.close()
- if not files_are_identical(main_f_name, temp_f_name):
+ if not utils.files_are_identical(main_f_name, temp_f_name):
_error("Failed to re-parse gir file; scanned=%r passthrough=%r" % (
main_f_name, temp_f_name))
os.unlink(temp_f_name)