summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-04-14 16:56:42 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-04-14 16:56:42 +0000
commit5686df753b49d59e73ab0a4722bc08783b2be555 (patch)
tree364d31769ec556d7d876c93c2ec9cc0dc9c8d3db
parent8242ff6cecf29f55f8e4a9134f427ff3667f432d (diff)
downloadlasso-5686df753b49d59e73ab0a4722bc08783b2be555.tar.gz
lasso-5686df753b49d59e73ab0a4722bc08783b2be555.tar.xz
lasso-5686df753b49d59e73ab0a4722bc08783b2be555.zip
lasso_node_dump() public method now returns a string (instead of void)
-rw-r--r--lasso/xml/xml.c9
-rw-r--r--lasso/xml/xml.h4
2 files changed, 7 insertions, 6 deletions
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c
index 5333a8bc..431020e3 100644
--- a/lasso/xml/xml.c
+++ b/lasso/xml/xml.c
@@ -43,7 +43,7 @@ lasso_node_build_query(LassoNode *node)
return (class->build_query(node));
}
-void
+xmlChar *
lasso_node_dump(LassoNode *node, const xmlChar *encoding, int format) {
LassoNodeClass *class = LASSO_NODE_GET_CLASS(node);
class->dump(node, encoding, format);
@@ -292,7 +292,7 @@ lasso_node_impl_build_query(LassoNode *node)
return (query);
}
-static void
+static xmlChar *
lasso_node_impl_dump(LassoNode *node,
const xmlChar *encoding,
int format)
@@ -305,12 +305,12 @@ lasso_node_impl_dump(LassoNode *node,
if (encoding != NULL) {
handler = xmlFindCharEncodingHandler(encoding);
if (handler == NULL) {
- return;
+ return (NULL);
}
}
buf = xmlAllocOutputBuffer(handler);
if (buf == NULL) {
- return;
+ return (NULL);
}
xmlNodeDumpOutput(buf, node->private->node->doc, node->private->node,
0, format, encoding);
@@ -328,6 +328,7 @@ lasso_node_impl_dump(LassoNode *node,
(void) xmlOutputBufferClose(buf);
printf("%s\n\n", ret);
+ return (ret);
}
static LassoAttr*
diff --git a/lasso/xml/xml.h b/lasso/xml/xml.h
index aa837caa..c949c510 100644
--- a/lasso/xml/xml.h
+++ b/lasso/xml/xml.h
@@ -61,7 +61,7 @@ struct _LassoNodeClass {
/*< vtable >*/
/*< public >*/
GString * (* build_query) (LassoNode *node);
- void (* dump) (LassoNode *,
+ xmlChar * (* dump) (LassoNode *,
const xmlChar *,
int);
LassoAttr* (* get_attr) (LassoNode *,
@@ -117,7 +117,7 @@ LASSO_EXPORT LassoNode* lasso_node_new(xmlNodePtr node);
LASSO_EXPORT GString* lasso_node_build_query (LassoNode *node);
-LASSO_EXPORT void lasso_node_dump (LassoNode *,
+LASSO_EXPORT xmlChar * lasso_node_dump (LassoNode *,
const xmlChar *,
int);