[gobject-introspection] giscanner: remove dead code



commit 9caabe68c8e53d51c2f3cae59673a2fbc54afa5f
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date:   Wed Aug 14 15:57:29 2013 +0200

    giscanner: remove dead code
    
    Last call sites where removed in 36aa515f1036978ced8d4ffb808260844f7229e0
    about 3 years ago.

 giscanner/gdumpparser.py     |    8 --------
 giscanner/girparser.py       |    3 ---
 giscanner/maintransformer.py |   14 --------------
 giscanner/transformer.py     |   37 -------------------------------------
 4 files changed, 0 insertions(+), 62 deletions(-)
---
diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py
index 568777b..0f537ea 100644
--- a/giscanner/gdumpparser.py
+++ b/giscanner/gdumpparser.py
@@ -523,14 +523,6 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide
         else:
             return False
 
-    def _strip_class_suffix(self, name):
-        if (name.endswith('Class') or name.endswith('Iface')):
-            return name[:-5]
-        elif name.endswith('Interface'):
-            return name[:-9]
-        else:
-            return None
-
     def _find_class_record(self, cls):
         pair_record = None
         if isinstance(cls, ast.Class):
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
index 2538036..35d985b 100644
--- a/giscanner/girparser.py
+++ b/giscanner/girparser.py
@@ -69,9 +69,6 @@ class GIRParser(object):
     def get_namespace(self):
         return self._namespace
 
-    def get_c_prefix(self):
-        return self._c_prefix
-
     # Private
 
     def _find_first_child(self, node, name_or_names):
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index a4f8f73..a614b34 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -731,20 +731,6 @@ class MainTransformer(object):
         self._apply_annotations_params(node, node.parameters, block)
         self._apply_annotations_return(node, node.retval, block)
 
-    def _check_arg_annotations(self, parent, params, block):
-        if block is None:
-            return
-        for tag in block.tags.keys():
-            if tag == TAG_RETURNS:
-                continue
-            for param in params:
-                if param.argname == tag:
-                    break
-            else:
-                message.warn(
-                    "Annotation for '%s' refers to unknown argument '%s'"
-                    % (parent.name, tag))
-
     def _apply_annotations_field(self, parent, block, field):
         if not block:
             return
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 7571347..b9c8ea6 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -615,20 +615,6 @@ raise ValueError."""
 
         return canonical
 
-    def parse_ctype(self, ctype, is_member=False):
-        canonical = self._canonicalize_ctype(ctype)
-
-        # Remove all pointers - we require standard calling
-        # conventions.  For example, an 'int' is always passed by
-        # value (unless it's out or inout).
-        derefed_typename = canonical.replace('*', '')
-
-        # Preserve "pointerness" of struct/union members
-        if (is_member and canonical.endswith('*') and derefed_typename in ast.basic_type_names):
-            return 'gpointer'
-        else:
-            return derefed_typename
-
     def _create_type_from_base(self, source_type, is_parameter=False, is_return=False):
         ctype = self._create_source_type(source_type)
         complete_ctype = self._create_complete_source_type(source_type)
@@ -952,29 +938,6 @@ Note that type resolution may not succeed."""
 
         return typeval.resolved
 
-    def _typepair_to_str(self, item):
-        nsname, item = item
-        if nsname is None:
-            return item.name
-        return '%s.%s' % (nsname, item.name)
-
-    def gtypename_to_giname(self, gtname, names):
-        resolved = names.type_names.get(gtname)
-        if resolved:
-            return self._typepair_to_str(resolved)
-        resolved = self._names.type_names.get(gtname)
-        if resolved:
-            return self._typepair_to_str(resolved)
-        raise KeyError("Failed to resolve GType name: %r" % (gtname, ))
-
-    def ctype_of(self, obj):
-        if hasattr(obj, 'ctype'):
-            return obj.ctype
-        elif hasattr(obj, 'symbol'):
-            return obj.symbol
-        else:
-            return None
-
     def resolve_aliases(self, typenode):
         """Removes all aliases from typenode, returns first non-alias
         in the typenode alias chain.  Returns typenode argument if it


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