diff options
author | Colin Walters <walters@verbum.org> | 2012-04-13 15:28:49 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2012-10-27 11:35:53 -0400 |
commit | 7f10346a378b2f33bf87730cce43c8b85e565952 (patch) | |
tree | 06feeaa1a74c4c2bd4167b527fa88a479bb765e0 /giscanner/transformer.py | |
parent | 0f923410a4106fc8e2c67ef7515e7f23a344121a (diff) | |
download | gobject-introspection-7f10346a378b2f33bf87730cce43c8b85e565952.tar.gz |
scanner: Ignore #defines starting with _
This matches our behavior for symbols (and we should probably fix this
more globally...I think we still scan _-prefixed enums).
Noticed from gudev which had #define _GUDEV_INSIDE_H 1
https://bugzilla.gnome.org/show_bug.cgi?id=674072
Diffstat (limited to 'giscanner/transformer.py')
-rw-r--r-- | giscanner/transformer.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py index b96e1417..e4938b93 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -710,6 +710,9 @@ raise ValueError.""" return ast.Return(typeval) def _create_const(self, symbol): + if symbol.ident.startswith('_'): + return None + # Don't create constants for non-public things # http://bugzilla.gnome.org/show_bug.cgi?id=572790 if (symbol.source_filename is None or |