Skip to content

Commit 5e8977b

Browse files
committed
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.
1 parent 432c4e7 commit 5e8977b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Zend/zend.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ struct _zend_class_entry {
143143
zend_class_iterator_funcs *iterator_funcs_ptr;
144144

145145
/* handlers */
146-
zend_object* (*create_object)(zend_class_entry *class_type);
146+
union {
147+
zend_object* (*create_object)(zend_class_entry *class_type);
148+
int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type); /* a class implements this interface */
149+
};
147150
zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref);
148-
int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type); /* a class implements this interface */
149151
union _zend_function *(*get_static_method)(zend_class_entry *ce, zend_string* method);
150152

151153
/* serializer callbacks */

Zend/zend_API.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ typedef struct _zend_fcall_info_cache {
202202
class_container.serialize = NULL; \
203203
class_container.unserialize = NULL; \
204204
class_container.create_object = NULL; \
205-
class_container.interface_gets_implemented = NULL; \
206205
class_container.get_static_method = NULL; \
207206
class_container.__call = NULL; \
208207
class_container.__callstatic = NULL; \

Zend/zend_compile.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,6 @@ ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify
17511751
ce->create_object = NULL;
17521752
ce->get_iterator = NULL;
17531753
ce->iterator_funcs_ptr = NULL;
1754-
ce->interface_gets_implemented = NULL;
17551754
ce->get_static_method = NULL;
17561755
ce->parent = NULL;
17571756
ce->num_interfaces = 0;

0 commit comments

Comments
 (0)