gobject-introspection r184 - in trunk: . giscanner
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r184 - in trunk: . giscanner
- Date: Mon, 21 Apr 2008 05:20:53 +0100 (BST)
Author: johan
Date: Mon Apr 21 04:20:53 2008
New Revision: 184
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=184&view=rev
Log:
2008-04-21 Johan Dahlin <johan gnome org>
* giscanner/gidlwriter.py (GIDLWriter._write_method):
Avoid duplication, reuse function writer for methods.
Modified:
trunk/ChangeLog
trunk/giscanner/gidlwriter.py
Modified: trunk/giscanner/gidlwriter.py
==============================================================================
--- trunk/giscanner/gidlwriter.py (original)
+++ trunk/giscanner/gidlwriter.py Mon Apr 21 04:20:53 2008
@@ -30,21 +30,16 @@
else:
print 'WRITER: Unhandled node', node
- def _write_function(self, func):
+ def _write_function(self, func, tag_name='function'):
attrs = [('name', func.name),
('symbol', func.symbol)]
- self.push_tag('function', attrs)
+ self.push_tag(tag_name, attrs)
self._write_return_type(func.retval)
self._write_parameters(func.parameters)
self.pop_tag()
def _write_method(self, method):
- attrs = [('name', method.name),
- ('symbol', method.symbol)]
- self.push_tag('method', attrs)
- self._write_return_type(method.retval)
- self._write_parameters(method.parameters)
- self.pop_tag()
+ self._write_function(method, tag_name='method')
def _write_return_type(self, return_):
if not return_:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]