[gobject-introspection] scanner: Skip functions with leading '_'
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] scanner: Skip functions with leading '_'
- Date: Thu, 9 Sep 2010 19:15:54 +0000 (UTC)
commit 677e0487d2296f326b68c0e55629e70e537b3c69
Author: Colin Walters <walters verbum org>
Date: Thu Sep 9 15:15:12 2010 -0400
scanner: Skip functions with leading '_'
Multiple modules have '_' prefixed symbols in "public" headers
meaning "don't use this in your app".
giscanner/transformer.py | 3 +++
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)
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]