diff options
| author | Marcus Boerger <helly@php.net> | 2003-10-26 00:39:48 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2003-10-26 00:39:48 +0000 |
| commit | 0d95b23a51bfbfde4fe31561872070534e7a381f (patch) | |
| tree | 437b89c9581021c4be75d209f485085df958d4e1 | |
| parent | 2befd022b1b1308b1137daa55564bbf1d21c3814 (diff) | |
| download | php-git-0d95b23a51bfbfde4fe31561872070534e7a381f.tar.gz | |
Fix casting (the question is when & what should be freed here).
| -rw-r--r-- | ext/simplexml/simplexml.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index f7a86a3d28..d0433b4bf7 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -360,7 +360,7 @@ _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval **value TSRM if (node->children && node->children->type == XML_TEXT_NODE && !xmlIsBlankNode(node->children)) { contents = xmlNodeListGetString(node->doc, node->children, 1); if (contents) { - ZVAL_STRING(*value, contents, 0); + ZVAL_STRING(*value, contents, 1); } } else { subnode = php_sxe_object_new(TSRMLS_C); @@ -739,6 +739,8 @@ cast_object(zval *object, int type, char *contents TSRMLS_DC) { if (contents) { ZVAL_STRINGL(object, contents, strlen(contents), 1); + object->refcount = 1; + object->is_ref = 0; } switch (type) { @@ -794,7 +796,7 @@ sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_ xmlFree(contents); } if (should_free) { - zval_dtor(&free_obj); + /*zval_dtor(&free_obj);*/ } return rv; } |
