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/sqlite3/sqlite3.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/sqlite3/sqlite3.c')
-rw-r--r-- | ext/sqlite3/sqlite3.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 31b9f1aa5b..556f7861f6 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -2113,7 +2113,7 @@ static zend_object *php_sqlite3_object_new(zend_class_entry *class_type) /* {{{ php_sqlite3_db_object *intern; /* Allocate memory for it */ - intern = ecalloc(1, sizeof(php_sqlite3_db_object) + sizeof(zval) * (class_type->default_properties_count - 1)); + intern = ecalloc(1, sizeof(php_sqlite3_db_object) + zend_object_properties_size(class_type)); /* Need to keep track of things to free */ zend_llist_init(&(intern->free_list), sizeof(php_sqlite3_free_list *), (llist_dtor_func_t)php_sqlite3_free_list_dtor, 0); @@ -2132,7 +2132,7 @@ static zend_object *php_sqlite3_stmt_object_new(zend_class_entry *class_type) /* php_sqlite3_stmt *intern; /* Allocate memory for it */ - intern = ecalloc(1, sizeof(php_sqlite3_stmt) + sizeof(zval) * (class_type->default_properties_count - 1)); + intern = ecalloc(1, sizeof(php_sqlite3_stmt) + zend_object_properties_size(class_type)); zend_object_std_init(&intern->zo, class_type); object_properties_init(&intern->zo, class_type); @@ -2148,7 +2148,7 @@ static zend_object *php_sqlite3_result_object_new(zend_class_entry *class_type) php_sqlite3_result *intern; /* Allocate memory for it */ - intern = ecalloc(1, sizeof(php_sqlite3_result) + sizeof(zval) * (class_type->default_properties_count - 1)); + intern = ecalloc(1, sizeof(php_sqlite3_result) + zend_object_properties_size(class_type)); zend_object_std_init(&intern->zo, class_type); object_properties_init(&intern->zo, class_type); |