thanks.
fixed it in subversion

On 12/3/06, Antony Dovgal <[EMAIL PROTECTED]> wrote:
No need to use _exists here, zend_hash_find() returns FAILURE if it's failed to 
find the value.
You're doing the hash lookup twice here:

        if (!zend_hash_exists(ht, ns_name, ns_len + 1)) {
                return NULL;
        }

        zend_hash_find(ht, ns_name, ns_len + 1, (void**)&res);

Just this is enough:

if (zend_hash_find() == SUCCESS) {
  return res;
}
return NULL;

And Andrey is right, valgrind is priceless when it comes to debugging memory 
errors.

--
Wbr,
Antony Dovgal



--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to