diff options
| author | Marcus Boerger <helly@php.net> | 2008-11-04 15:58:55 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2008-11-04 15:58:55 +0000 |
| commit | 7126de4912d9d4c7499deb1f9239980400aa7ec7 (patch) | |
| tree | dc1bbf251d26825d2f65f599a6139044effdbc48 /Zend/zend_API.c | |
| parent | 6ca3ad3f41fd44b6f00adb9692d5503a33ecd290 (diff) | |
| download | php-git-7126de4912d9d4c7499deb1f9239980400aa7ec7.tar.gz | |
- Next step in namespaces, using / as namespace separator.
Diffstat (limited to 'Zend/zend_API.c')
| -rw-r--r-- | Zend/zend_API.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 36a7639a2d..23a3dbbe31 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1794,8 +1794,8 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio if (scope) { class_name_len = strlen(scope->name); - if ((lc_class_name = zend_memrchr(scope->name, ':', class_name_len))) { - lc_class_name++; + if ((lc_class_name = zend_memrchr(scope->name, '\\', class_name_len))) { + ++lc_class_name; class_name_len -= (lc_class_name - scope->name); lc_class_name = zend_str_tolower_dup(lc_class_name, class_name_len); } else { @@ -2394,13 +2394,11 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca fcc->function_handler = NULL; if (!ce_org) { - /* Skip leading :: */ - if (Z_STRVAL_P(callable)[0] == ':' && - Z_STRVAL_P(callable)[1] == ':' - ) { - mlen = Z_STRLEN_P(callable) - 2; - mname = Z_STRVAL_P(callable) + 2; - lmname = zend_str_tolower_dup(Z_STRVAL_P(callable) + 2, mlen); + /* Skip leading \ */ + if (Z_STRVAL_P(callable)[0] == '\\') { + mlen = Z_STRLEN_P(callable) - 1; + mname = Z_STRVAL_P(callable) + 1; + lmname = zend_str_tolower_dup(Z_STRVAL_P(callable) + 1, mlen); } else { mlen = Z_STRLEN_P(callable); mname = Z_STRVAL_P(callable); |
