com php-src: Fixed Zend Hash API usage (although it's in comments): ext/opcache/Optimizer/block_pass.c
| From: | Xinchen Hui | Date: | Sun, 18 May 2014 04:05:36 +0000 |
| Subject: | com php-src: Fixed Zend Hash API usage (although it's in comments): ext/opcache/Optimizer/block_pass.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78430@lists.php.net to get a copy of this message | ||
Commit: eb5c61331198576cab516315eebb2cbbb0c43d71
Author: Xinchen Hui <laruence@gmail.com> Sun, 18 May 2014 12:05:36 +0800
Parents: 3cbdcdc2c8e7c88d448ac3d37109ac5981c3e9b9
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=eb5c61331198576cab516315eebb2cbbb0c43d71
Log:
Fixed Zend Hash API usage (although it's in comments)
Changed paths:
M ext/opcache/Optimizer/block_pass.c
Diff:
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index 3316e52..20b7a1a 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -751,7 +751,7 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
(flen == sizeof("is_callable")-1 && zend_binary_strcasecmp(fname, flen,
"is_callable", sizeof("is_callable")-1) == 0)
) {
zend_function *function;
- if(zend_hash_find(EG(function_table), Z_STRVAL_P(arg), Z_STRLEN_P(arg)+1, (void
**)&function) != NULL) {
+ if((function = zend_hash_find_ptr(EG(function_table), Z_STR_P(arg))) != NULL) {
literal_dtor(arg);
MAKE_NOP(sv);
MAKE_NOP(fcall);
@@ -769,7 +769,7 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
ZEND_OP1_TYPE(opline) = IS_CONST;
}
} else if(flen == sizeof("extension_loaded")-1 &&
zend_binary_strcasecmp(fname, flen, "extension_loaded",
sizeof("extension_loaded")-1) == 0) {
- if(zend_hash_exists(&module_registry, Z_STRVAL_P(arg), Z_STRLEN_P(arg)+1)) {
+ if(zend_hash_exists(&module_registry, Z_STR_P(arg))) {
literal_dtor(arg);
MAKE_NOP(sv);
MAKE_NOP(fcall);