diff options
Diffstat (limited to 'Zend/zend_interfaces.c')
-rw-r--r-- | Zend/zend_interfaces.c | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 2710432d89..c857f8954b 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -28,6 +28,7 @@ ZEND_API zend_class_entry *zend_ce_aggregate; ZEND_API zend_class_entry *zend_ce_iterator; ZEND_API zend_class_entry *zend_ce_arrayaccess; ZEND_API zend_class_entry *zend_ce_serializable; +ZEND_API zend_class_entry *zend_ce_countable; /* {{{ zend_call_method Only returns the returned zval if retval_ptr != NULL */ @@ -107,13 +108,6 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun zend_error_noreturn(E_CORE_ERROR, "Couldn't execute method %s%s%s", obj_ce ? ZSTR_VAL(obj_ce->name) : "", obj_ce ? "::" : "", function_name); } } - /* copy arguments back, they might be changed by references */ - if (param_count > 0 && Z_ISREF(params[0]) && !Z_ISREF_P(arg1)) { - ZVAL_COPY_VALUE(arg1, ¶ms[0]); - } - if (param_count > 1 && Z_ISREF(params[1]) && !Z_ISREF_P(arg2)) { - ZVAL_COPY_VALUE(arg2, ¶ms[1]); - } if (!retval_ptr) { zval_ptr_dtor(&retval); return NULL; @@ -187,16 +181,6 @@ ZEND_API zval *zend_user_it_get_current_data(zend_object_iterator *_iter) } /* }}} */ -/* {{{ zend_user_it_get_current_key_default */ -#if 0 -static int zend_user_it_get_current_key_default(zend_object_iterator *_iter, char **str_key, uint *str_key_len, ulong *int_key) -{ - *int_key = _iter->index; - return HASH_KEY_IS_LONG; -} -#endif -/* }}} */ - /* {{{ zend_user_it_get_current_key */ ZEND_API void zend_user_it_get_current_key(zend_object_iterator *_iter, zval *key) { @@ -390,15 +374,6 @@ static int zend_implement_iterator(zend_class_entry *interface, zend_class_entry /* {{{ zend_implement_arrayaccess */ static int zend_implement_arrayaccess(zend_class_entry *interface, zend_class_entry *class_type) { -#if 0 - /* get ht from ce */ - if (ht->read_dimension != zend_std_read_dimension - || ht->write_dimension != zend_std_write_dimension - || ht->has_dimension != zend_std_has_dimension - || ht->unset_dimension != zend_std_unset_dimension) { - return FAILURE; - } -#endif return SUCCESS; } /* }}}*/ @@ -496,6 +471,13 @@ static int zend_implement_serializable(zend_class_entry *interface, zend_class_e } /* }}}*/ +/* {{{ zend_implement_countable */ +static int zend_implement_countable(zend_class_entry *interface, zend_class_entry *class_type) +{ + return SUCCESS; +} +/* }}}*/ + /* {{{ function tables */ const zend_function_entry zend_funcs_aggregate[] = { ZEND_ABSTRACT_ME(iterator, getIterator, NULL) @@ -543,6 +525,14 @@ const zend_function_entry zend_funcs_serializable[] = { ZEND_FENTRY(unserialize, NULL, arginfo_serializable_serialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT|ZEND_ACC_CTOR) ZEND_FE_END }; + +ZEND_BEGIN_ARG_INFO(arginfo_countable_count, 0) +ZEND_END_ARG_INFO() + +const zend_function_entry zend_funcs_countable[] = { + ZEND_ABSTRACT_ME(Countable, count, arginfo_countable_count) + ZEND_FE_END +}; /* }}} */ /* {{{ zend_register_interfaces */ @@ -559,6 +549,8 @@ ZEND_API void zend_register_interfaces(void) REGISTER_MAGIC_INTERFACE(arrayaccess, ArrayAccess); REGISTER_MAGIC_INTERFACE(serializable, Serializable); + + REGISTER_MAGIC_INTERFACE(countable, Countable); } /* }}} */ @@ -568,4 +560,6 @@ ZEND_API void zend_register_interfaces(void) * c-basic-offset: 4 * indent-tabs-mode: t * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 */ |