Re: cvs: php-src(PHP_5_2) /ext/soap php_sdl.c

From: Date: Wed, 20 Dec 2006 04:06:43 +0000
Subject: Re: cvs: php-src(PHP_5_2) /ext/soap php_sdl.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-42209@lists.php.net to get a copy of this message
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) {
« previous php.cvs (#42209) next »