cvs: /php4/ext/xml xml.c
| From: | Thies C . Arntzen | Date: | Sun, 08 Aug 1999 11:37:51 +0000 |
| Subject: | cvs: /php4/ext/xml xml.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-3209@lists.php.net to get a copy of this message | ||
thies Sun Aug 8 07:37:51 1999 EDT
Modified files:
/php4/ext/xml xml.c
Log:
fix for #1995 (this module needs some more work.)
Index: php4/ext/xml/xml.c
diff -u php4/ext/xml/xml.c:1.14 php4/ext/xml/xml.c:1.15
--- php4/ext/xml/xml.c:1.14 Mon Aug 2 15:16:53 1999
+++ php4/ext/xml/xml.c Sun Aug 8 07:37:50 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xml.c,v 1.14 1999/08/02 19:16:53 zeev Exp $ */
+/* $Id: xml.c,v 1.15 1999/08/08 11:37:50 thies Exp $ */
#define IS_EXT_MODULE
/* boldly assume that if PIC is defined, we are being compiled dynamically */
@@ -102,7 +102,8 @@
PHPAPI pval *php3i_long_pval(long value)
{
- pval *ret = emalloc(sizeof(pval));
+ pval *ret;
+ MAKE_STD_ZVAL(ret);
ret->type = IS_LONG;
ret->value.lval = value;
@@ -114,7 +115,8 @@
PHPAPI pval *php3i_double_pval(double value)
{
- pval *ret = emalloc(sizeof(pval));
+ pval *ret;
+ MAKE_STD_ZVAL(ret);
ret->type = IS_DOUBLE;
ret->value.dval = value;
@@ -126,8 +128,9 @@
PHPAPI pval *php3i_string_pval(const char *str)
{
- pval *ret = emalloc(sizeof(pval));
+ pval *ret;
int len = strlen(str);
+ MAKE_STD_ZVAL(ret);
ret->type = IS_STRING;
ret->value.str.len = len;
@@ -703,7 +706,7 @@
if (parser->startElementHandler) {
args[0] = php3i_long_pval(parser->index);
args[1] = php3i_string_pval(name);
- args[2] = emalloc(sizeof(pval));
+ MAKE_STD_ZVAL(args[2]);
array_init(args[2]);
while (attributes && *attributes) {
char *key = (char *)attributes[0];