From 3dad242cb2e4a27731622d6c94ae7fa330bad227 Mon Sep 17 00:00:00 2001 From: Valery Febvre Date: Sun, 16 May 2004 22:32:52 +0000 Subject: New method lasso_node_destroy() added in class LassoNode --- python/xml/py_xml.c | 31 +++++++++++++++---------------- python/xml/py_xml.h | 2 +- 2 files changed, 16 insertions(+), 17 deletions(-) (limited to 'python/xml') diff --git a/python/xml/py_xml.c b/python/xml/py_xml.c index d7a44583..4085ccaf 100644 --- a/python/xml/py_xml.c +++ b/python/xml/py_xml.c @@ -43,6 +43,21 @@ PyObject *LassoNode_wrap(LassoNode *node) { /* LassoNode */ /******************************************************************************/ +PyObject *node_destroy(PyObject *self, PyObject *args) { + PyObject *node_obj; + + if (CheckArgs(args, "O:node_destroy")) { + if(!PyArg_ParseTuple(args, (char *) "O:node_destroy", &node_obj)) + return NULL; + } + else return NULL; + + lasso_node_destroy(LassoNode_get(node_obj)); + + Py_INCREF(Py_None); + return (Py_None); +} + PyObject *node_dump(PyObject *self, PyObject *args) { PyObject *node_obj; xmlChar *encoding; @@ -176,22 +191,6 @@ PyObject *node_get_content(PyObject *self, PyObject *args) { return (xmlCharPtr_wrap(ret)); } -PyObject *node_unref(PyObject *self, PyObject *args) { - PyObject *node_obj; - - if (CheckArgs(args, "O:node_unref")) { - if(!PyArg_ParseTuple(args, (char *) "O:node_unref", &node_obj)) - return NULL; - } - else return NULL; - - /* FIXME: should used a fct lasso_node_unref() ??? */ - g_object_unref (G_OBJECT (LassoNode_get(node_obj))); - - Py_INCREF(Py_None); - return (Py_None); -} - PyObject *node_verify_signature(PyObject *self, PyObject *args) { PyObject *node_obj; const gchar *certificate_file; diff --git a/python/xml/py_xml.h b/python/xml/py_xml.h index 82d9fed4..35665f84 100644 --- a/python/xml/py_xml.h +++ b/python/xml/py_xml.h @@ -36,6 +36,7 @@ typedef struct { #define LassoNode_get(v) (((v) == Py_None) ? NULL : (((LassoNode_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) PyObject *LassoNode_wrap(LassoNode *node); +PyObject *node_destroy(PyObject *self, PyObject *args); PyObject *node_dump(PyObject *self, PyObject *args); PyObject *node_export(PyObject *self, PyObject *args); PyObject *node_export_to_base64(PyObject *self, PyObject *args); @@ -44,7 +45,6 @@ PyObject *node_export_to_soap(PyObject *self, PyObject *args); PyObject *node_get_attr_value(PyObject *self, PyObject *args); PyObject *node_get_child(PyObject *self, PyObject *args); PyObject *node_get_content(PyObject *self, PyObject *args); -PyObject *node_unref(PyObject *self, PyObject *args); PyObject *node_verify_signature(PyObject *self, PyObject *args); #endif /* __PYLASSO_PY_XML_H__ */ -- cgit