gobject-introspection r239 - in trunk: . giscanner tests/parser
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r239 - in trunk: . giscanner tests/parser
- Date: Mon, 28 Apr 2008 03:12:17 +0100 (BST)
Author: johan
Date: Mon Apr 28 02:12:17 2008
New Revision: 239
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=239&view=rev
Log:
2008-04-27 Johan Dahlin <johan gnome org>
* giscanner/xmlwriter.py:
* tests/parser/Foo-expected.gir:
Include indentation in line length calculation
Modified:
trunk/ChangeLog
trunk/giscanner/xmlwriter.py
trunk/tests/parser/Foo-expected.gir
Modified: trunk/giscanner/xmlwriter.py
==============================================================================
--- trunk/giscanner/xmlwriter.py (original)
+++ trunk/giscanner/xmlwriter.py Mon Apr 28 02:12:17 2008
@@ -32,17 +32,19 @@
# Private
- def _calc_attrs_length(self, attributes):
+ def _calc_attrs_length(self, attributes, indent):
+ if indent == -1:
+ return -1
attr_length = 0
for attr, value in attributes:
attr_length += 1 + len(attr) + len(quoteattr(value))
- return attr_length
+ return attr_length + indent
def _collect_attributes(self, attributes, indent=-1):
if not attributes:
return ''
- if indent != -1 and self._calc_attrs_length(attributes) > 79:
+ if self._calc_attrs_length(attributes, indent) > 79:
indent_len = self._indent + indent
else:
indent_len = 0
Modified: trunk/tests/parser/Foo-expected.gir
==============================================================================
--- trunk/tests/parser/Foo-expected.gir (original)
+++ trunk/tests/parser/Foo-expected.gir Mon Apr 28 02:12:17 2008
@@ -210,7 +210,9 @@
<member name="FOO_ENUM_DEUX" value="2"/>
<member name="FOO_ENUM_TROIS" value="3"/>
</enumeration>
- <glib:boxed glib:name="Boxed" glib:type-name="FooBoxed" glib:get-type="foo_boxed_get_type">
+ <glib:boxed glib:name="Boxed"
+ glib:type-name="FooBoxed"
+ glib:get-type="foo_boxed_get_type">
<constructor name="new" c:identifier="foo_boxed_new">
<return-value c:identifer="Boxed*">
<type name="Boxed*"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]