[scanner] Mark enum members as private in transformer
authorJohan Dahlin <johan@gnome.org>
Sun, 26 Sep 2010 15:47:01 +0000 (12:47 -0300)
committerJohan Dahlin <johan@gnome.org>
Sun, 26 Sep 2010 15:47:01 +0000 (12:47 -0300)
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
giscanner/transformer.py

index d5f9a65c070663ea0e1507ae63c00e2293dffa8e..4d85e33eb3cb0e744e5e951f77a4588e3fa0ea83 100644 (file)
@@ -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);
          }
        ;
 
index 9f2bc153c977b50c1851810e882a9ae890645dfd..4ad4d870a6aaed5e64377a89e96fc38c94e848e5 100644 (file)
@@ -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