cvs: /php4/ext/domxml domxml.c

From: Date: Thu, 03 Feb 2000 21:12:28 +0000
Subject: cvs: /php4/ext/domxml domxml.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-9745@lists.php.net to get a copy of this message
steinm Thu Feb 3 22:12:28 2000 EDT Modified files: /php4/ext/domxml domxml.c Log: - fixed several bugs, left some for tomorrow :-) Index: php4/ext/domxml/domxml.c diff -u php4/ext/domxml/domxml.c:1.9 php4/ext/domxml/domxml.c:1.10 --- php4/ext/domxml/domxml.c:1.9 Thu Feb 3 18:21:23 2000 +++ php4/ext/domxml/domxml.c Thu Feb 3 22:11:58 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domxml.c,v 1.9 2000/02/03 17:21:23 steinm Exp $ */ +/* $Id: domxml.c,v 1.10 2000/02/03 21:11:58 steinm Exp $ */ #include "php.h" @@ -633,7 +633,8 @@ pval *id, **tmp; int id_to_find; xmlDoc *docp; - xmlChar *mem; + char *mem; +// xmlChar *mem; int size; int type; @@ -665,7 +666,7 @@ if (!size) { RETURN_FALSE; } - RETURN_STRINGL(mem, size, 0); + RETURN_STRINGL(mem, size, 1); } /* }}} */ @@ -714,6 +715,8 @@ RETURN_FALSE; } id_to_find = (*tmp)->value.lval; + if(getParameters(ht, 2, &name, &content) == FAILURE) + WRONG_PARAM_COUNT; } else { RETURN_FALSE; } @@ -722,9 +725,9 @@ } else { convert_to_long(id); id_to_find = id->value.lval; - convert_to_string(name); - convert_to_string(content); } + convert_to_string(name); + convert_to_string(content); nodep = (xmlNode *)zend_list_find(id_to_find, &type); if (!nodep || type != le_domxmlnodep) { @@ -768,6 +771,8 @@ RETURN_FALSE; } id_to_find = (*tmp)->value.lval; + if (getParameters(ht, 1, &name) == FAILURE) + WRONG_PARAM_COUNT; } else { RETURN_FALSE; } @@ -776,8 +781,8 @@ } else { convert_to_long(id); id_to_find = id->value.lval; - convert_to_string(name); } + convert_to_string(name); docp = (xmlDoc *)zend_list_find(id_to_find, &type); if (!docp || type != le_domxmldocp) {

« previous php.version4 (#9745) next »