com php-src: Inline zend_find_builtin_type: Zend/zend _compile.c

From: Date: Sat, 23 May 2015 09:12:13 +0000
Subject: com php-src: Inline zend_find_builtin_type: Zend/zend _compile.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86887@lists.php.net to get a copy of this message
Commit: e13803d15bc1e332ed133cd100edf2fe6d6866cb Author: Levi Morrison <levim@php.net> Wed, 20 May 2015 19:54:11 -0600 Committer: Nikita Popov <nikic@php.net> Sat, 23 May 2015 11:12:13 +0200 Parents: e22ceb6e829ebb0f54a89d85d35f4aec3e9b5712 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e13803d15bc1e332ed133cd100edf2fe6d6866cb Log: Inline zend_find_builtin_type This function was used only inside of zend_find_builtin_type_by_name, which is also used only one time. Changed paths: M Zend/zend_compile.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 41d6ead..4721ecd 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -193,7 +193,8 @@ static const builtin_type_info builtin_types[] = { {NULL, 0, IS_UNDEF} }; -static zend_always_inline const builtin_type_info* zend_find_builtin_type(const zend_string *name) /* {{{ */ + +static zend_always_inline zend_uchar zend_lookup_builtin_type_by_name(const zend_string *name) /* {{{ */ { const builtin_type_info *info = &builtin_types[0]; @@ -201,23 +202,11 @@ static zend_always_inline const builtin_type_info* zend_find_builtin_type(const if (name->len == info->name_len && zend_binary_strcasecmp(name->val, name->len, info->name, info->name_len) == 0 ) { - return info; + return info->type; } } - return NULL; -} -/* }}} */ - -static zend_always_inline zend_uchar zend_lookup_builtin_type_by_name(const zend_string *const_name) /* {{{ */ -{ - const builtin_type_info *info = zend_find_builtin_type(const_name); - - if (info) { - return info->type; - } else { - return 0; - } + return 0; } /* }}} */

« previous php.cvs (#86887) next »