summaryrefslogtreecommitdiff
path: root/ext/dom/php_dom.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2015-02-08 14:08:31 +0000
committerJakub Zelenka <bukka@php.net>2015-02-08 14:08:31 +0000
commitf2825042b4dd9aa941a080c027f15f41c1b9e4bc (patch)
tree2e7d97c1dfd4aeabb506ffdd206a612b82adea8d /ext/dom/php_dom.c
parent0a81f9a0bd36deac8707949acbcf92f612b60e8e (diff)
parentce9f52adcdfb19f70dc4274f3587e58ac07995bd (diff)
downloadphp-git-f2825042b4dd9aa941a080c027f15f41c1b9e4bc.tar.gz
Merge branch 'master' into jsond
Conflicts: ext/json/json.c
Diffstat (limited to 'ext/dom/php_dom.c')
-rw-r--r--ext/dom/php_dom.c4
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);