mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Use zend_object_alloc() in ext/intl (#17392)
This commit is contained in:
parent
cc4402b6cb
commit
fcea7af9d9
3 changed files with 3 additions and 9 deletions
|
@ -234,9 +234,7 @@ static void Calendar_objects_free(zend_object *object)
|
|||
/* {{{ Calendar_object_create */
|
||||
static zend_object *Calendar_object_create(zend_class_entry *ce)
|
||||
{
|
||||
Calendar_object* intern;
|
||||
|
||||
intern = (Calendar_object*)ecalloc(1, sizeof(Calendar_object) + sizeof(zval) * (ce->default_properties_count - 1));
|
||||
Calendar_object* intern = (Calendar_object*)zend_object_alloc(sizeof(Calendar_object), ce);
|
||||
|
||||
zend_object_std_init(&intern->zo, ce);
|
||||
object_properties_init(&intern->zo, ce);
|
||||
|
|
|
@ -204,9 +204,7 @@ static zend_object_iterator *IntlIterator_get_iterator(
|
|||
|
||||
static zend_object *IntlIterator_object_create(zend_class_entry *ce)
|
||||
{
|
||||
IntlIterator_object *intern;
|
||||
|
||||
intern = (IntlIterator_object*)ecalloc(1, sizeof(IntlIterator_object) + sizeof(zval) * (ce->default_properties_count - 1));
|
||||
IntlIterator_object *intern = (IntlIterator_object*)zend_object_alloc(sizeof(IntlIterator_object), ce);
|
||||
|
||||
zend_object_std_init(&intern->zo, ce);
|
||||
object_properties_init(&intern->zo, ce);
|
||||
|
|
|
@ -335,9 +335,7 @@ static void TimeZone_objects_free(zend_object *object)
|
|||
/* {{{ TimeZone_object_create */
|
||||
static zend_object *TimeZone_object_create(zend_class_entry *ce)
|
||||
{
|
||||
TimeZone_object* intern;
|
||||
|
||||
intern = (TimeZone_object*)ecalloc(1, sizeof(TimeZone_object) + sizeof(zval) * (ce->default_properties_count - 1));
|
||||
TimeZone_object* intern = (TimeZone_object*)zend_object_alloc(sizeof(TimeZone_object), ce);
|
||||
|
||||
zend_object_std_init(&intern->zo, ce);
|
||||
object_properties_init(&intern->zo, ce);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue