From 9e70d7672dd646b8c9b29ccc452e4dc5aa015437 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 4 Feb 2015 15:24:13 +0300 Subject: Move zend_object->guards into additional slot of zend_object->properties_table[]. As result size of objects without __get/__set/__unset/__isset magic methods is reduced. --- ext/date/php_date.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/date/php_date.c') diff --git a/ext/date/php_date.c b/ext/date/php_date.c index a00c4c5a94..a89636c36c 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2069,7 +2069,7 @@ static inline zend_object *date_object_new_date_ex(zend_class_entry *class_type, { php_date_obj *intern; - intern = ecalloc(1, sizeof(php_date_obj) + sizeof(zval) * (class_type->default_properties_count - 1)); + intern = ecalloc(1, sizeof(php_date_obj) + zend_object_properties_size(class_type)); zend_object_std_init(&intern->std, class_type); if (init_props) { @@ -2200,7 +2200,7 @@ static inline zend_object *date_object_new_timezone_ex(zend_class_entry *class_t { php_timezone_obj *intern; - intern = ecalloc(1, sizeof(php_timezone_obj) + sizeof(zval) * (class_type->default_properties_count - 1)); + intern = ecalloc(1, sizeof(php_timezone_obj) + zend_object_properties_size(class_type)); zend_object_std_init(&intern->std, class_type); if (init_props) { @@ -2291,7 +2291,7 @@ static inline zend_object *date_object_new_interval_ex(zend_class_entry *class_t { php_interval_obj *intern; - intern = ecalloc(1, sizeof(php_interval_obj) + sizeof(zval) * (class_type->default_properties_count - 1)); + intern = ecalloc(1, sizeof(php_interval_obj) + zend_object_properties_size(class_type)); zend_object_std_init(&intern->std, class_type); if (init_props) { @@ -2372,7 +2372,7 @@ static inline zend_object *date_object_new_period_ex(zend_class_entry *class_typ { php_period_obj *intern; - intern = ecalloc(1, sizeof(php_period_obj) + sizeof(zval) * (class_type->default_properties_count - 1)); + intern = ecalloc(1, sizeof(php_period_obj) + zend_object_properties_size(class_type)); zend_object_std_init(&intern->std, class_type); if (init_props) { -- cgit v1.2.1