diff options
author | Colin Walters <walters@verbum.org> | 2010-09-09 15:15:12 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-09-09 15:15:12 -0400 |
commit | 677e0487d2296f326b68c0e55629e70e537b3c69 (patch) | |
tree | 76f822c446d7e6d670dd9a5739abf1a60f488c3b | |
parent | 79e0ea087341e09e4bbbbc77479a3e91fb824446 (diff) |
scanner: Skip functions with leading '_'
Multiple modules have '_' prefixed symbols in "public" headers
meaning "don't use this in your app".
-rw-r--r-- | giscanner/transformer.py | 3 | ||||
-rw-r--r-- | tests/scanner/regress.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py index 328d29e..1acc67a 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -367,6 +367,9 @@ raise ValueError.""" return node def _create_function(self, symbol): + # Drop functions that start with _ very early on here + if symbol.ident.startswith('_'): + return None parameters = list(self._create_parameters(symbol.base_type)) return_ = self._create_return(symbol.base_type.base_type) try: diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h index 9887758..5c39260 100644 --- a/tests/scanner/regress.h +++ b/tests/scanner/regress.h @@ -521,6 +521,8 @@ void regress_test_torture_signature_2 (int x, GValue *regress_test_date_in_gvalue (void); GValue *regress_test_strv_in_gvalue (void); +GObject * _regress_this_is_a_private_symbol (void); + /** * RegressSkippedStructure: (skip) * |