Skip to content

Commit f15f327

Browse files
committed
Remove empty "interface gets implemented" handlers
1 parent 262f52d commit f15f327

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

Zend/zend_interfaces.c

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -426,13 +426,6 @@ static int zend_implement_iterator(zend_class_entry *interface, zend_class_entry
426426
}
427427
/* }}} */
428428

429-
/* {{{ zend_implement_arrayaccess */
430-
static int zend_implement_arrayaccess(zend_class_entry *interface, zend_class_entry *class_type)
431-
{
432-
return SUCCESS;
433-
}
434-
/* }}}*/
435-
436429
/* {{{ zend_user_serialize */
437430
ZEND_API int zend_user_serialize(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data)
438431
{
@@ -526,13 +519,6 @@ static int zend_implement_serializable(zend_class_entry *interface, zend_class_e
526519
}
527520
/* }}}*/
528521

529-
/* {{{ zend_implement_countable */
530-
static int zend_implement_countable(zend_class_entry *interface, zend_class_entry *class_type)
531-
{
532-
return SUCCESS;
533-
}
534-
/* }}}*/
535-
536522
/* {{{ function tables */
537523
static const zend_function_entry zend_funcs_aggregate[] = {
538524
ZEND_ABSTRACT_ME(iterator, getIterator, arginfo_class_IteratorAggregate_getIterator)
@@ -586,13 +572,15 @@ ZEND_API void zend_register_interfaces(void)
586572
REGISTER_MAGIC_INTERFACE(iterator, Iterator);
587573
REGISTER_MAGIC_IMPLEMENT(iterator, traversable);
588574

589-
REGISTER_MAGIC_INTERFACE(arrayaccess, ArrayAccess);
590-
591575
REGISTER_MAGIC_INTERFACE(serializable, Serializable);
592576

593-
REGISTER_MAGIC_INTERFACE(countable, Countable);
594-
595577
zend_class_entry ce;
578+
INIT_CLASS_ENTRY(ce, "ArrayAccess", zend_funcs_arrayaccess);
579+
zend_ce_arrayaccess = zend_register_internal_interface(&ce);
580+
581+
INIT_CLASS_ENTRY(ce, "Countable", zend_funcs_countable);
582+
zend_ce_countable = zend_register_internal_interface(&ce);
583+
596584
INIT_CLASS_ENTRY(ce, "Stringable", zend_funcs_stringable);
597585
zend_ce_stringable = zend_register_internal_interface(&ce);
598586
}

0 commit comments

Comments
 (0)