diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-02-04 15:24:13 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-02-04 15:24:13 +0300 |
commit | 9e70d7672dd646b8c9b29ccc452e4dc5aa015437 (patch) | |
tree | 0b852db11ab8fdcab020d6f13ee631291849b6d2 /ext/dom/php_dom.c | |
parent | 87377c1707beec44f35cd6d91e5822a31479f170 (diff) | |
download | php-git-9e70d7672dd646b8c9b29ccc452e4dc5aa015437.tar.gz |
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.
Diffstat (limited to 'ext/dom/php_dom.c')
-rw-r--r-- | ext/dom/php_dom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 6797e894b5..b6b66fc507 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1081,7 +1081,7 @@ void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xml static dom_object* dom_objects_set_class(zend_class_entry *class_type, zend_bool hash_copy) /* {{{ */ { - dom_object *intern = ecalloc(1, sizeof(dom_object) + sizeof(zval) * (class_type->default_properties_count - 1)); + dom_object *intern = ecalloc(1, sizeof(dom_object) + zend_object_properties_size(class_type)); zend_class_entry *base_class = class_type; while (base_class->type != ZEND_INTERNAL_CLASS && base_class->parent != NULL) { @@ -1112,7 +1112,7 @@ zend_object *dom_objects_new(zend_class_entry *class_type) /* {{{ zend_object_value dom_xpath_objects_new(zend_class_entry *class_type) */ zend_object *dom_xpath_objects_new(zend_class_entry *class_type) { - dom_xpath_object *intern = ecalloc(1, sizeof(dom_xpath_object) + sizeof(zval) * (class_type->default_properties_count - 1)); + dom_xpath_object *intern = ecalloc(1, sizeof(dom_xpath_object) + zend_object_properties_size(class_type)); ALLOC_HASHTABLE(intern->registered_phpfunctions); zend_hash_init(intern->registered_phpfunctions, 0, NULL, ZVAL_PTR_DTOR, 0); |