From bc26c8f129dd0b64f067624dea97259a664bbef1 Mon Sep 17 00:00:00 2001 From: Valery Febvre Date: Thu, 6 May 2004 17:02:18 +0000 Subject: *** empty log message *** --- python/lasso.py | 3 +++ python/lassomod.c | 1 + python/setup.py | 8 ++++---- python/xml/py_xml.c | 16 ++++++++++++++++ python/xml/py_xml.h | 1 + 5 files changed, 25 insertions(+), 4 deletions(-) (limited to 'python') diff --git a/python/lasso.py b/python/lasso.py index bf498859..eea0a596 100644 --- a/python/lasso.py +++ b/python/lasso.py @@ -72,6 +72,9 @@ class Node: def get_child(self, name): return Node(_obj=lassomod.node_get_child(self, name)) + def get_content(self): + return lassomod.node_get_content(self) + def url_encode(self, sign_method, private_key_file): return lassomod.node_url_encode(self, sign_method, private_key_file) diff --git a/python/lassomod.c b/python/lassomod.c index b780b0ec..d3b7d58c 100644 --- a/python/lassomod.c +++ b/python/lassomod.c @@ -64,6 +64,7 @@ static PyMethodDef lasso_methods[] = { {"node_dump", node_dump, METH_VARARGS}, {"node_get_attr_value", node_get_attr_value, METH_VARARGS}, {"node_get_child", node_get_child, METH_VARARGS}, + {"node_get_content", node_get_content, METH_VARARGS}, {"node_unref", node_unref, METH_VARARGS}, {"node_url_encode", node_url_encode, METH_VARARGS}, {"node_soap_envelop", node_soap_envelop, METH_VARARGS}, diff --git a/python/setup.py b/python/setup.py index a94d5190..49aadb6e 100755 --- a/python/setup.py +++ b/python/setup.py @@ -180,10 +180,10 @@ extract_cflags(xmlsec1_cflags) extract_libs(xmlsec1_libs) # FIXME : cflags & libs for lasso -#include_dirs.append('..') -#library_dirs.append('../lasso/.libs') -include_dirs.append('/usr/local/include') -library_dirs.append('/usr/local/lib') +include_dirs.append('..') +library_dirs.append('../lasso/.libs') +#include_dirs.append('/usr/local/include') +#library_dirs.append('/usr/local/lib') libraries.append('lasso') em = Extension("lassomod", diff --git a/python/xml/py_xml.c b/python/xml/py_xml.c index 76384319..d13c835e 100644 --- a/python/xml/py_xml.c +++ b/python/xml/py_xml.c @@ -95,6 +95,22 @@ PyObject *node_get_child(PyObject *self, PyObject *args) { return (LassoNode_wrap(ret)); } +PyObject *node_get_content(PyObject *self, PyObject *args) { + PyObject *node_obj; + xmlChar *ret; + + if (CheckArgs(args, "O:node_get_content")) { + if(!PyArg_ParseTuple(args, (char *) "O:node_get_content", + &node_obj)) + return NULL; + } + else return NULL; + + ret = lasso_node_get_content(LassoNode_get(node_obj)); + + return (xmlCharPtr_wrap(ret)); +} + PyObject *node_unref(PyObject *self, PyObject *args) { PyObject *node_obj; diff --git a/python/xml/py_xml.h b/python/xml/py_xml.h index 52723113..afc4200f 100644 --- a/python/xml/py_xml.h +++ b/python/xml/py_xml.h @@ -39,6 +39,7 @@ PyObject *LassoNode_wrap(LassoNode *node); PyObject *node_dump(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_url_encode(PyObject *self, PyObject *args); PyObject *node_soap_envelop(PyObject *self, PyObject *args); -- cgit