[scanner] Remove a bunch of unused functions
authorJohan Dahlin <johan@gnome.org>
Mon, 6 Sep 2010 14:21:39 +0000 (11:21 -0300)
committerJohan Dahlin <johan@gnome.org>
Mon, 6 Sep 2010 16:06:02 +0000 (13:06 -0300)
giscanner/ast.py

index 0b9520d5e280dda7fc9c83fe203b5d5251f42fc1..551dbb1594419b243ce8bcd91a7b4083673247bc 100644 (file)
@@ -348,11 +348,6 @@ returned."""
             target = '%s.%s' % (self.name, name)
         return Type(target_giname=target, ctype=ctype)
 
-    def contains_ident(self, ident):
-        """Return True if this namespace should contain the given C
-identifier string."""
-        return any(ident.startswith(prefix) for prefix in self.identifier_prefixes)
-
     def append(self, node, replace=False):
         previous = self._names.get(node.name)
         if previous is not None:
@@ -484,9 +479,6 @@ GIName.  It's possible for nodes to contain or point to other nodes."""
     def __repr__(self):
         return '%s(%r)' % (self.__class__.__name__, self.name)
 
-    def remove_matching_children(self, pred):
-        pass
-
     def inherit_file_positions(self, node):
         self.file_positions.update(node.file_positions)
 
@@ -717,11 +709,6 @@ class Record(Node):
             if field.anonymous_node is not None:
                 field.anonymous_node.walk(callback, chain)
 
-    def remove_matching_children(self, pred):
-        self.fields = filter(pred, self.fields)
-        self.constructors = filter(pred, self.constructors)
-        self.methods = filter(pred, self.methods)
-
 
 class Field(Annotated):
 
@@ -761,12 +748,6 @@ class Class(Node):
         self.properties = []
         self.fields = []
 
-    def remove_matching_children(self, pred):
-        self.methods = filter(pred, self.methods)
-        self.constructors = filter(pred, self.constructors)
-        self.properties = filter(pred, self.properties)
-        self.fields = filter(pred, self.fields)
-
     def _walk(self, callback, chain):
         for meth in self.methods:
             meth.walk(callback, chain)