diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2008-04-29 12:09:19 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2008-04-29 12:09:19 +0000 |
| commit | 6890ff4090efe0a36d7e04b62dbb84a6c0e19009 (patch) | |
| tree | 55fc6a240031323937c95998784e137e7d64a113 | |
| parent | 09f41a733ede7415239b0d0cff2c6b4cac617bdc (diff) | |
[project @ fpeters@0d.be-20080405204856-apdxhkk5pdhmx0nj]
support for xmlNode* attributes
Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-04-05 22:48:56.805000+02:00
| -rw-r--r-- | bindings/lang_python.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bindings/lang_python.py b/bindings/lang_python.py index b51cf135..fbe31fcf 100644 --- a/bindings/lang_python.py +++ b/bindings/lang_python.py @@ -654,7 +654,7 @@ register_constants(PyObject *d) parse_format = 'i' parse_arg = '&value' print >> fd, ' %s value;' % arg_type - elif arg_type in ('GList*','GHashTable*'): + elif arg_type in ('GList*','GHashTable*', 'xmlNode*'): parse_format = 'O' print >> fd, ' PyObject *cvt_value;' parse_arg = '&cvt_value' @@ -682,6 +682,9 @@ register_constants(PyObject *d) print >> fd, ' set_list_of_pygobject(&this->%s, cvt_value);' % m[1] elif parse_format == 'O' and arg_type == 'GHashTable*': print >> fd, ' set_hashtable_of_pygobject(this->%s, cvt_value);' % m[1] + elif parse_format == 'O' and arg_type == 'xmlNode*': + print >> fd, ' if (this->%s) xmlFreeNode(this->%s);' % (m[1], m[1]) + print >> fd, ' this->%s = get_xml_node_from_pystring(cvt_value);' % m[1] elif parse_format == 'O': print >> fd, ' set_object_field((GObject**)&this->%s, cvt_value);' % m[1] print >> fd, ' return noneRef();' |
