minimized the memory allocated for GetContent and a bit of cleanup. Daniel

* tree.c: minimized the memory allocated for GetContent
  and a bit of cleanup.
Daniel
This commit is contained in:
Daniel Veillard 2003-01-23 18:24:20 +00:00
parent ff12c494f7
commit 814a76db87
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Thu Jan 23 19:22:54 CET 2003 Daniel Veillard <daniel@veillard.com>
* tree.c: minimized the memory allocated for GetContent
and a bit of cleanup.
Thu Jan 23 17:41:37 CET 2003 Daniel Veillard <daniel@veillard.com>
* python/generator.py: seems there is no good reasons to

5
tree.c
View File

@ -4170,7 +4170,7 @@ xmlNodeGetContent(xmlNodePtr cur)
xmlBufferPtr buffer;
xmlChar *ret;
buffer = xmlBufferCreate();
buffer = xmlBufferCreateSize(64);
if (buffer == NULL)
return (NULL);
while (tmp != NULL) {
@ -5382,10 +5382,11 @@ xmlSetProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value) {
*/
int
xmlUnsetProp(xmlNodePtr node, const xmlChar *name) {
xmlAttrPtr prop = node->properties, prev = NULL;;
xmlAttrPtr prop, prev = NULL;;
if ((node == NULL) || (name == NULL))
return(-1);
prop = node->properties;
while (prop != NULL) {
if ((xmlStrEqual(prop->name, name)) &&
(prop->ns == NULL)) {