summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2003-04-01 19:37:04 +0000
committerAndrei Zmievski <andrei@php.net>2003-04-01 19:37:04 +0000
commit62f9eb8006ef7484cc1ea224c4c131b0d6f677d3 (patch)
tree559038ab451ceeb0eb5daac22bde94a5ca71feab /Zend/zend_execute.c
parente2333fd1df3e35218701af1ef5ec19fd5c9e9e5a (diff)
downloadphp-git-62f9eb8006ef7484cc1ea224c4c131b0d6f677d3.tar.gz
Split ZEND_NAMESPACE into user and internal namespaces. Hope this is
okay with engine folks.
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index ad70427915..88274c8e17 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -2371,7 +2371,7 @@ int zend_fetch_class_handler(ZEND_OPCODE_HANDLER_ARGS)
if(retval == FAILURE) {
/* try namespace */
- if(zend_hash_find(&EG(global_namespace_ptr)->class_table, class_name_strval, class_name_strlen+1, (void **)&pce) == SUCCESS && (*pce)->type != ZEND_NAMESPACE) {
+ if(zend_hash_find(&EG(global_namespace_ptr)->class_table, class_name_strval, class_name_strlen+1, (void **)&pce) == SUCCESS && (*pce)->type != ZEND_USER_NAMESPACE && (*pce)->type != ZEND_INTERNAL_NAMESPACE) {
retval = SUCCESS;
}
}
@@ -2382,7 +2382,7 @@ int zend_fetch_class_handler(ZEND_OPCODE_HANDLER_ARGS)
if(EX(opline)->extended_value == ZEND_FETCH_CLASS_GLOBAL) {
ns = EG(global_namespace_ptr);
} else {
- if (zend_hash_find(&EG(global_namespace_ptr)->class_table, EX(opline)->op1.u.constant.value.str.val, EX(opline)->op1.u.constant.value.str.len+1, (void **)&pce) == FAILURE || (*pce)->type != ZEND_NAMESPACE) {
+ if (zend_hash_find(&EG(global_namespace_ptr)->class_table, EX(opline)->op1.u.constant.value.str.val, EX(opline)->op1.u.constant.value.str.len+1, (void **)&pce) == FAILURE || ((*pce)->type != ZEND_USER_NAMESPACE && (*pce)->type != ZEND_INTERNAL_NAMESPACE)) {
zend_error(E_ERROR, "Namespace '%s' not found", EX(opline)->op1.u.constant.value.str.val);
}
ns = *pce;
@@ -3976,7 +3976,7 @@ int zend_start_namespace_handler(ZEND_OPCODE_HANDLER_ARGS)
zend_error(E_ERROR, "Internal error: Invalid type in namespace definition - %d", Z_TYPE_P(namespace_name));
}
- if(zend_hash_find(&EG(global_namespace_ptr)->class_table, Z_STRVAL_P(namespace_name), Z_STRLEN_P(namespace_name)+1, (void **)&pns) != SUCCESS || (*pns)->type != ZEND_NAMESPACE) {
+ if(zend_hash_find(&EG(global_namespace_ptr)->class_table, Z_STRVAL_P(namespace_name), Z_STRLEN_P(namespace_name)+1, (void **)&pns) != SUCCESS || (*pns)->type != ZEND_USER_NAMESPACE) {
zend_error(E_ERROR, "Internal error: Cannot locate namespace '%s'", Z_STRVAL_P(namespace_name));
}
} else {