summaryrefslogtreecommitdiff
path: root/tools/glib-client-gen.py
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2008-02-20 12:29:59 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2008-02-20 12:29:59 +0000
commitc05b6aa504ab28d6be777d3819ec763d6aa5b01d (patch)
treeae11e743b6e12b1ac254aaa59214dbee701b66ed /tools/glib-client-gen.py
parent94fe445bbbdb53035395cd802c6128cacd2ea981 (diff)
Avoid using CDATA where possible
Diffstat (limited to 'tools/glib-client-gen.py')
-rw-r--r--tools/glib-client-gen.py31
1 files changed, 14 insertions, 17 deletions
diff --git a/tools/glib-client-gen.py b/tools/glib-client-gen.py
index 89af95092..4ff78cd0b 100644
--- a/tools/glib-client-gen.py
+++ b/tools/glib-client-gen.py
@@ -28,7 +28,7 @@ import xml.dom.minidom
from getopt import gnu_getopt
from libglibcodegen import Signature, type_to_gtype, cmp_by_name, \
- camelcase_to_lower, get_docstring
+ camelcase_to_lower, get_docstring, xml_escape
NS_TP = "http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
@@ -118,8 +118,8 @@ class Generator(object):
name, info, tp_type, elt = arg
ctype, gtype, marshaller, pointer = info
- self.b(' * @%s: <![CDATA[%s]]>' % (name,
- get_docstring(elt) or '(Undocumented)'))
+ self.b(' * @%s: %s' % (name,
+ xml_escape(get_docstring(elt) or '(Undocumented)')))
self.b(' * @user_data: User-supplied data')
self.b(' * @weak_object: User-supplied weakly referenced object')
@@ -293,8 +293,7 @@ class Generator(object):
self.b(' *')
self.b(' * Connect a handler to the signal %s.' % member)
self.b(' *')
- self.b(' * <![CDATA[%s]]>'
- % (get_docstring(signal) or '(Undocumented)'))
+ self.b(' * %s' % xml_escape(get_docstring(signal) or '(Undocumented)'))
self.b(' *')
self.b(' * Returns: a #TpProxySignalConnection containing all of the')
self.b(' * above, which can be used to disconnect the signal; or')
@@ -406,8 +405,8 @@ class Generator(object):
ctype, gtype, marshaller, pointer = info
self.b(' * @%s: Used to return an \'out\' argument if @error is '
- '%%NULL: <![CDATA[%s]]>'
- % (name, get_docstring(elt) or '(Undocumented)'))
+ '%%NULL: %s'
+ % (name, xml_escape(get_docstring(elt) or '(Undocumented)')))
self.b(' * @error: %NULL on success, or an error on failure')
self.b(' * @user_data: user-supplied data')
@@ -652,8 +651,8 @@ class Generator(object):
name, info, tp_type, elt = arg
ctype, gtype, marshaller, pointer = info
- self.b(' * @%s: Used to pass an \'in\' argument: <![CDATA[%s]]>'
- % (name, get_docstring(elt) or '(Undocumented)'))
+ self.b(' * @%s: Used to pass an \'in\' argument: %s'
+ % (name, xml_escape(get_docstring(elt) or '(Undocumented)')))
self.b(' * @callback: called when the method call succeeds or fails')
self.b(' * @user_data: user-supplied data passed to the callback')
@@ -665,8 +664,7 @@ class Generator(object):
self.b(' *')
self.b(' * Start a %s method call.' % member)
self.b(' *')
- self.b(' * <![CDATA[%s]]>'
- % (get_docstring(method) or '(Undocumented)'))
+ self.b(' * %s' % xml_escape(get_docstring(method) or '(Undocumented)'))
self.b(' *')
self.b(' * Returns: a #TpProxyPendingCall representing the call in')
self.b(' * progress. It is borrowed from the object, and will become')
@@ -870,16 +868,16 @@ class Generator(object):
name, info, tp_type, elt = arg
ctype, gtype, marshaller, pointer = info
- self.b(' * @%s: Used to pass an \'in\' argument: <![CDATA[%s]]>'
- % (name, get_docstring(elt) or '(Undocumented)'))
+ self.b(' * @%s: Used to pass an \'in\' argument: %s'
+ % (name, xml_escape(get_docstring(elt) or '(Undocumented)')))
for arg in out_args:
name, info, tp_type, elt = arg
ctype, gtype, marshaller, pointer = info
self.b(' * @%s: Used to return an \'out\' argument if %%TRUE is '
- 'returned: <![CDATA[%s]]>'
- % (name, get_docstring(elt) or '(Undocumented)'))
+ 'returned: %s'
+ % (name, xml_escape(get_docstring(elt) or '(Undocumented)')))
self.b(' * @error: If not %NULL, used to return errors if %FALSE ')
self.b(' * is returned')
@@ -895,8 +893,7 @@ class Generator(object):
self.b(' * and generally ensure that everything is in a consistent')
self.b(' * state.')
self.b(' *')
- self.b(' * <![CDATA[%s]]>'
- % (get_docstring(method) or '(Undocumented)'))
+ self.b(' * %s' % xml_escape(get_docstring(method) or '(Undocumented)'))
self.b(' *')
self.b(' * Returns: TRUE on success, FALSE and sets @error on error')
self.b(' */')