summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2001-09-24 18:26:04 +0000
committerAndi Gutmans <andi@php.net>2001-09-24 18:26:04 +0000
commitda339a6eae2e7faa44abc512d0f1be5dc897dba5 (patch)
treeea87ec21b9c5b91962aa9024e15a1953ecdde9b0 /Zend/zend_execute.c
parent892f61f1ff0417a7b87b9345359464e36515518e (diff)
downloadphp-git-da339a6eae2e7faa44abc512d0f1be5dc897dba5.tar.gz
- More namespaces work
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 010d181ca4..c2161d4e57 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1758,8 +1758,16 @@ do_fcall_common:
EG(exception) = NULL;
NEXT_OPCODE();
case ZEND_NAMESPACE:
- fprintf(stderr, "Namespace '%s'\n", opline->op1.u.constant.value.str.val);
- NEXT_OPCODE();
+ {
+ Namespace *namespace_ptr;
+
+ if (zend_hash_find(EG(namespaces), opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len + 1, (void **) &namespace_ptr) == FAILURE) {
+ zend_error(E_ERROR, "Internal namespaces error. Please report this!");
+ }
+ EG(function_table) = namespace_ptr->function_table;
+ EG(class_table) = namespace_ptr->class_table;
+ NEXT_OPCODE();
+ }
case ZEND_SEND_VAL:
if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
&& ARG_SHOULD_BE_SENT_BY_REF(opline->op2.u.opline_num, fbc, fbc->common.arg_types)) {