Merge zend_class_entry.create_object and zend_class_entry.interface_gets_implemented into the same memory lacation. The first used only by classes, the second only by magic interfaces.

This commit is contained in:
Dmitry Stogov 2018-07-12 17:09:40 +03:00
parent 432c4e77a8
commit 5e8977bd62
3 changed files with 4 additions and 4 deletions

View file

@ -143,9 +143,11 @@ struct _zend_class_entry {
zend_class_iterator_funcs *iterator_funcs_ptr;
/* handlers */
union {
zend_object* (*create_object)(zend_class_entry *class_type);
zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref);
int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type); /* a class implements this interface */
};
zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref);
union _zend_function *(*get_static_method)(zend_class_entry *ce, zend_string* method);
/* serializer callbacks */

View file

@ -202,7 +202,6 @@ typedef struct _zend_fcall_info_cache {
class_container.serialize = NULL; \
class_container.unserialize = NULL; \
class_container.create_object = NULL; \
class_container.interface_gets_implemented = NULL; \
class_container.get_static_method = NULL; \
class_container.__call = NULL; \
class_container.__callstatic = NULL; \

View file

@ -1751,7 +1751,6 @@ ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify
ce->create_object = NULL;
ce->get_iterator = NULL;
ce->iterator_funcs_ptr = NULL;
ce->interface_gets_implemented = NULL;
ce->get_static_method = NULL;
ce->parent = NULL;
ce->num_interfaces = 0;