summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-03-03 17:06:15 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-03-03 17:06:38 +0100
commitf15f3272cf7ddd3984d217ecffafdae05b975dfc (patch)
tree084d7c1ac461f61d4ca77e739c072c7cb1c37727
parent262f52d5e2dedbc735363ddd3504190447edf3bf (diff)
downloadphp-git-f15f3272cf7ddd3984d217ecffafdae05b975dfc.tar.gz
Remove empty "interface gets implemented" handlers
-rw-r--r--Zend/zend_interfaces.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index db42202571..fe403b3d7a 100644
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -426,13 +426,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)
-{
- return SUCCESS;
-}
-/* }}}*/
-
/* {{{ zend_user_serialize */
ZEND_API int zend_user_serialize(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data)
{
@@ -526,13 +519,6 @@ 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 */
static const zend_function_entry zend_funcs_aggregate[] = {
ZEND_ABSTRACT_ME(iterator, getIterator, arginfo_class_IteratorAggregate_getIterator)
@@ -586,13 +572,15 @@ ZEND_API void zend_register_interfaces(void)
REGISTER_MAGIC_INTERFACE(iterator, Iterator);
REGISTER_MAGIC_IMPLEMENT(iterator, traversable);
- REGISTER_MAGIC_INTERFACE(arrayaccess, ArrayAccess);
-
REGISTER_MAGIC_INTERFACE(serializable, Serializable);
- REGISTER_MAGIC_INTERFACE(countable, Countable);
-
zend_class_entry ce;
+ INIT_CLASS_ENTRY(ce, "ArrayAccess", zend_funcs_arrayaccess);
+ zend_ce_arrayaccess = zend_register_internal_interface(&ce);
+
+ INIT_CLASS_ENTRY(ce, "Countable", zend_funcs_countable);
+ zend_ce_countable = zend_register_internal_interface(&ce);
+
INIT_CLASS_ENTRY(ce, "Stringable", zend_funcs_stringable);
zend_ce_stringable = zend_register_internal_interface(&ce);
}