summaryrefslogtreecommitdiff
path: root/giscanner/scannermain.py
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-09-01 12:39:52 -0400
committerColin Walters <walters@verbum.org>2010-09-01 12:39:52 -0400
commitc8e227432c5072ab858f8acd93b24ffc26ed1c68 (patch)
tree74e8a56e665da9d2ccc9c72068ae1f1f2ac13636 /giscanner/scannermain.py
parent5d114c3832a8ac6b3897c02be420d299fb90692c (diff)
downloadgobject-introspection-c8e227432c5072ab858f8acd93b24ffc26ed1c68.tar.gz
scanner: Refactor name parsing
First, merge the implementations of parsing both identifiers and symbols, since they had more in common than they had differences. Secondly, fix the logic for priority of --accept-unprefixed in the presence of unprefixed includes. The current namespace should win. An example of this is mutter which has unprefixed public symbols, but also includes xlib, which has no prefix. Third, for unprefixed namespaces, actually look at the contents rather than just blindly returning them. This is a bit of a hack, but better than the alternatives.
Diffstat (limited to 'giscanner/scannermain.py')
-rw-r--r--giscanner/scannermain.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 384727e2..3b7cd533 100644
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -102,7 +102,8 @@ the latter is not specified.""")
help="Remove this prefix from C symbols (function names)")
parser.add_option("", "--accept-unprefixed",
action="store_true", dest="accept_unprefixed", default=False,
- help="If specified, accept symbols and identifiers that do not match the namespace prefix.")
+ help="""If specified, accept symbols and identifiers that do not
+match the namespace prefix.""")
parser.add_option("", "--add-init-section",
action="append", dest="init_sections", default=[],
help="add extra initialization code in the introspection program")