diff options
author | Levi Morrison <levim@php.net> | 2015-05-20 19:54:11 -0600 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-05-23 11:12:13 +0200 |
commit | e13803d15bc1e332ed133cd100edf2fe6d6866cb (patch) | |
tree | 7e929f4c74ca8b56b033b609e3a61f2b0abd0867 | |
parent | e22ceb6e829ebb0f54a89d85d35f4aec3e9b5712 (diff) | |
download | php-git-e13803d15bc1e332ed133cd100edf2fe6d6866cb.tar.gz |
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.
-rw-r--r-- | Zend/zend_compile.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 41d6ead229..4721ecd939 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; } /* }}} */ |