[gobject-introspection] [scanner] Mark enum members as private in transformer



commit 60a8c752b300470f33994be75b72a91cf349b6f0
Author: Johan Dahlin <johan gnome org>
Date:   Sun Sep 26 12:47:01 2010 -0300

    [scanner] Mark enum members as private in transformer
    
    Remove enum members which follows /* <private> */ comments
    inside the transformer instead of the sourcescanner itself.
    
    Fixes a crash when creating the gir for GstBase.

 giscanner/scannerparser.y |   10 ++--------
 giscanner/transformer.py  |    2 +-
 2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/giscanner/scannerparser.y b/giscanner/scannerparser.y
index d5f9a65..4d85e33 100644
--- a/giscanner/scannerparser.y
+++ b/giscanner/scannerparser.y
@@ -878,17 +878,11 @@ enumerator_list
 	  }
 	  enumerator
 	  {
-              if (!scanner->private)
-                {
-                  $$ = g_list_append (NULL, $2);
-                }
+            $$ = g_list_append (NULL, $2);
 	  }
 	| enumerator_list ',' enumerator
 	  {
-              if (!scanner->private)
-                {
-                  $$ = g_list_append ($1, $3);
-                }
+            $$ = g_list_append ($1, $3);
 	  }
 	;
 
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 9f2bc15..4ad4d87 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -354,7 +354,7 @@ raise ValueError."""
             if prefixlen > 0:
                 name = child.ident[prefixlen:]
             else:
-                if child.ident is None:
+                if child.private:
                     continue
                 # Ok, the enum members don't have a consistent prefix
                 # among them, so let's just remove the global namespace



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]