Oops, forgot to attach the patches!

----- Original Message -----
From: "Matt Wilmas"
Sent: Tuesday, December 19, 2006

> Hi Ilia,
>
> A little late, but I made a patch for HEAD since this wasn't applied
there.
> In the process, I noticed that "i" has the value of
zend_hash_num_elements()
> so the second call to it isn't needed.  (Indentation was also off on those
2
> lines...)
>
>
> Matt
Index: ext/soap/php_sdl.c
===================================================================
RCS file: /repository/php-src/ext/soap/php_sdl.c,v
retrieving revision 1.105
diff -u -r1.105 php_sdl.c
--- ext/soap/php_sdl.c  20 Sep 2006 13:43:04 -0000      1.105
+++ ext/soap/php_sdl.c  20 Dec 2006 03:48:01 -0000
@@ -1862,8 +1862,8 @@
        if (i > 0) {
                sdlTypePtr *tmp;
 
-         tmp_elements = emalloc(sizeof(HashTable));
-         zend_hash_init(tmp_elements, 0, NULL, NULL, 0);
+               tmp_elements = emalloc(sizeof(HashTable));
+               zend_hash_init(tmp_elements, i, NULL, NULL, 0);
 
                zend_hash_internal_pointer_reset(type->elements);
                while (zend_hash_get_current_data(type->elements, (void**)&tmp) 
== SUCCESS) {
Index: ext/soap/php_sdl.c
===================================================================
RCS file: /repository/php-src/ext/soap/php_sdl.c,v
retrieving revision 1.88.2.12.2.4
diff -u -r1.88.2.12.2.4 php_sdl.c
--- ext/soap/php_sdl.c  30 Nov 2006 23:51:24 -0000      1.88.2.12.2.4
+++ ext/soap/php_sdl.c  20 Dec 2006 03:49:58 -0000
@@ -1862,8 +1862,8 @@
        if (i > 0) {
                sdlTypePtr *tmp;
 
-         tmp_elements = emalloc(sizeof(HashTable));
-         zend_hash_init(tmp_elements, zend_hash_num_elements(type->elements), 
NULL, NULL, 0);
+               tmp_elements = emalloc(sizeof(HashTable));
+               zend_hash_init(tmp_elements, i, NULL, NULL, 0);
 
                zend_hash_internal_pointer_reset(type->elements);
                while (zend_hash_get_current_data(type->elements, (void**)&tmp) 
== SUCCESS) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to