diff options
author | Stanislav Malyshev <stas@php.net> | 2002-02-07 14:08:43 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2002-02-07 14:08:43 +0000 |
commit | 6608f07322789bd0896b265c29e13c0c9f5d5898 (patch) | |
tree | 3149fb62b09cbea8d328df4d930e4cddb99aef03 /Zend/zend_execute_API.c | |
parent | 5e9b1634c68dc70bbc6480fddb303d8807a943d2 (diff) | |
download | php-git-6608f07322789bd0896b265c29e13c0c9f5d5898.tar.gz |
Mega-commit: Enter the new object model
Note: only standard Zend objects are working now. This is definitely going to
break custom objects like COM, Java, etc. - this will be fixed later.
Also, this may break other things that access objects' internals directly.
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index e116a5ca03..4e324d2eec 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -331,7 +331,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) last = tsrm_strtok_r(p->value.str.val, ":", &temp); - if (zend_hash_find(EG(class_table), last, strlen(last)+1, &ce) == FAILURE) { + if (zend_hash_find(EG(class_table), last, strlen(last)+1, (void **)&ce) == FAILURE) { zend_error(E_ERROR, "Invalid class! Improve this error message"); } @@ -342,7 +342,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) if (!cur) { break; } - if (zend_hash_find(&ce->class_table, last, strlen(last)+1, &ce) == FAILURE) { + if (zend_hash_find(&ce->class_table, last, strlen(last)+1, (void **)&ce) == FAILURE) { zend_error(E_ERROR, "Invalid class! Improve this error message"); } last = cur; @@ -477,7 +477,14 @@ int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *fun if (object_pp && !*object_pp) { object_pp = NULL; } + if (object_pp) { + /* TBI!! new object handlers */ + if(!IS_ZEND_STD_OBJECT(**object_pp)) { + zend_error(E_WARNING, "Cannot use call_user_function on overloaded objects"); + return FAILURE; + } + if (Z_TYPE_PP(object_pp) == IS_OBJECT) { function_table = &Z_OBJCE_PP(object_pp)->function_table; calling_namespace = Z_OBJCE_PP(object_pp); |