[gobject-introspection] giscanner: drop dead code



commit 964d9229d188dc9661149bd153c7bf29e3669bb7
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date:   Wed Nov 21 17:50:55 2012 +0100

    giscanner: drop dead code
    
    DocOptions already has a position attribute, no need to overwrite it
    when the position of DocBlock or DocTag is set, hence the
    set_position methods are no longer needed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688897

 giscanner/annotationparser.py |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index 28db1a3..0e7e91b 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -154,10 +154,6 @@ class DocBlock(object):
     def __repr__(self):
         return '<DocBlock %r %r>' % (self.name, self.options)
 
-    def set_position(self, position):
-        self.position = position
-        self.options.position = position
-
     def get_tag(self, name):
         return self.tags.get(name)
 
@@ -309,10 +305,6 @@ class DocTag(object):
                 value_str), self.position)
             return
 
-    def set_position(self, position):
-        self.position = position
-        self.options.position = position
-
     def _get_gtk_doc_value(self):
         def serialize_one(option, value, fmt, fmt2):
             if value:
@@ -679,7 +671,7 @@ class AnnotationParser(object):
                     in_part = PART_IDENTIFIER
 
                     comment_block = DocBlock(identifier_name)
-                    comment_block.set_position(position)
+                    comment_block.position = position
 
                     if 'colon' in result.groupdict() and result.group('colon') != ':':
                         colon_start = result.start('colon')
@@ -749,7 +741,7 @@ class AnnotationParser(object):
                                  position)
 
                 tag = DocTag(comment_block, param_name)
-                tag.set_position(position)
+                tag.position = position
                 tag.comment = param_description
                 if param_annotations:
                     tag.options = self.parse_options(tag, param_annotations)



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