File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -85,13 +85,12 @@ static zend_always_inline size_t zend_object_properties_size(zend_class_entry *c
85
85
((ce -> ce_flags & ZEND_ACC_USE_GUARDS ) ? 0 : 1 ));
86
86
}
87
87
88
- /* Allocates object type and zeros it, but not the properties.
88
+ /* Allocates object type and zeros it, but not the standard zend_object and properties.
89
+ * Standard object MUST be initialized using zend_object_std_init().
89
90
* Properties MUST be initialized using object_properties_init(). */
90
91
static zend_always_inline void * zend_object_alloc (size_t obj_size , zend_class_entry * ce ) {
91
92
void * obj = emalloc (obj_size + zend_object_properties_size (ce ));
92
- /* Subtraction of sizeof(zval) is necessary, because zend_object_properties_size() may be
93
- * -sizeof(zval), if the object has no properties. */
94
- memset (obj , 0 , obj_size - sizeof (zval ));
93
+ memset (obj , 0 , obj_size - sizeof (zend_object ));
95
94
return obj ;
96
95
}
97
96
You can’t perform that action at this time.
0 commit comments