com php-src: For filenames a pointer comparison is sufficient: Zend/zend_compile.c

From: Date: Mon, 28 Jul 2014 20:30:24 +0000
Subject: com php-src: For filenames a pointer comparison is sufficient: Zend/zend_compile.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-80888@lists.php.net to get a copy of this message
Commit: 047a994830e87291d7446c41df9cc1ba9851dee4 Author: Nikita Popov <nikic@php.net> Mon, 28 Jul 2014 22:30:24 +0200 Parents: e9fb72c8eab7a1f5cc89dae6b2951bcbba6c49f3 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=047a994830e87291d7446c41df9cc1ba9851dee4 Log: For filenames a pointer comparison is sufficient Changed paths: M Zend/zend_compile.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 12fd046..6d08860 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6171,7 +6171,7 @@ void zend_compile_use(zend_ast *ast TSRMLS_DC) { { zend_function *fn = zend_hash_find_ptr(CG(function_table), lookup_name); if (fn && fn->type == ZEND_USER_FUNCTION - && !strcmp(fn->op_array.filename->val, CG(compiled_filename)->val) + && fn->op_array.filename == CG(compiled_filename) ) { zend_check_already_in_use(type, old_name, new_name, lookup_name); } @@ -6180,7 +6180,7 @@ void zend_compile_use(zend_ast *ast TSRMLS_DC) { case T_CONST: { zend_string *filename = zend_hash_find_ptr(&CG(const_filenames), lookup_name); - if (filename && !strcmp(filename->val, CG(compiled_filename)->val)) { + if (filename && filename == CG(compiled_filename)) { zend_check_already_in_use(type, old_name, new_name, lookup_name); } break;

« previous php.cvs (#80888) next »