mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Use zend_hash_find() instead of zend_hash_find_ptr() to avoid double check
This commit is contained in:
parent
856ad54f45
commit
a6fcbb7c87
3 changed files with 32 additions and 18 deletions
|
@ -866,7 +866,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
|
|||
ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *key, int use_autoload) /* {{{ */
|
||||
{
|
||||
zend_class_entry *ce = NULL;
|
||||
zval args[1];
|
||||
zval args[1], *zv;
|
||||
zval local_retval;
|
||||
zend_string *lc_name;
|
||||
zend_fcall_info fcall_info;
|
||||
|
@ -887,12 +887,12 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
|
|||
}
|
||||
}
|
||||
|
||||
ce = zend_hash_find_ptr(EG(class_table), lc_name);
|
||||
if (ce) {
|
||||
zv = zend_hash_find(EG(class_table), lc_name);
|
||||
if (zv) {
|
||||
if (!key) {
|
||||
zend_string_release(lc_name);
|
||||
}
|
||||
return ce;
|
||||
return (zend_class_entry*)Z_PTR_P(zv);
|
||||
}
|
||||
|
||||
/* The compiler is not-reentrant. Make sure we __autoload() only during run-time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue