summaryrefslogtreecommitdiff
path: root/ext/gmp
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-02-04 15:24:13 +0300
committerDmitry Stogov <dmitry@zend.com>2015-02-04 15:24:13 +0300
commit9e70d7672dd646b8c9b29ccc452e4dc5aa015437 (patch)
tree0b852db11ab8fdcab020d6f13ee631291849b6d2 /ext/gmp
parent87377c1707beec44f35cd6d91e5822a31479f170 (diff)
downloadphp-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/gmp')
-rw-r--r--ext/gmp/gmp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index f4742a6cce..75b157b890 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -378,8 +378,7 @@ static void gmp_free_object_storage(zend_object *obj) /* {{{ */
static inline zend_object *gmp_create_object_ex(zend_class_entry *ce, mpz_ptr *gmpnum_target) /* {{{ */
{
- gmp_object *intern = emalloc(sizeof(gmp_object)
- + sizeof(zval) * (ce->default_properties_count - 1));
+ gmp_object *intern = emalloc(sizeof(gmp_object) + zend_object_properties_size(ce));
zend_object_std_init(&intern->std, ce);
object_properties_init(&intern->std, ce);