diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-07-04 19:22:24 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-07-04 19:22:24 +0300 |
commit | 4a475a4976db92e71949786cdf5990c61514261e (patch) | |
tree | 6934c9e00200e6388256656b8fa71c97a1a3a158 /ext/intl/timezone/timezone_class.cpp | |
parent | d798fd491be77943fb751ad97d85475bf324192c (diff) | |
download | php-git-4a475a4976db92e71949786cdf5990c61514261e.tar.gz |
Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
Diffstat (limited to 'ext/intl/timezone/timezone_class.cpp')
-rw-r--r-- | ext/intl/timezone/timezone_class.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp index 929797a96e..1f20ea9b52 100644 --- a/ext/intl/timezone/timezone_class.cpp +++ b/ext/intl/timezone/timezone_class.cpp @@ -154,7 +154,7 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone, intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR, message, 1); efree(message); } - zval_dtor(&local_zv_tz); + zval_ptr_dtor_str(&local_zv_tz); return NULL; } timeZone = to->utimezone->clone(); @@ -164,7 +164,7 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone, intl_errors_set(outside_error, U_MEMORY_ALLOCATION_ERROR, message, 1); efree(message); } - zval_dtor(&local_zv_tz); + zval_ptr_dtor_str(&local_zv_tz); return NULL; } } else if (Z_TYPE_P(zv_timezone) == IS_OBJECT && @@ -172,7 +172,7 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone, php_timezone_obj *tzobj = Z_PHPTIMEZONE_P(zv_timezone); - zval_dtor(&local_zv_tz); + zval_ptr_dtor_str(&local_zv_tz); return timezone_convert_datetimezone(tzobj->type, tzobj, 0, outside_error, func); } else { @@ -188,7 +188,7 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone, intl_errors_set(outside_error, status, message, 1); efree(message); } - zval_dtor(&local_zv_tz); + zval_ptr_dtor_str(&local_zv_tz); return NULL; } timeZone = TimeZone::createTimeZone(id); @@ -198,7 +198,7 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone, intl_errors_set(outside_error, U_MEMORY_ALLOCATION_ERROR, message, 1); efree(message); } - zval_dtor(&local_zv_tz); + zval_ptr_dtor_str(&local_zv_tz); return NULL; } if (timeZone->getID(gottenId) != id) { @@ -208,13 +208,13 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone, intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR, message, 1); efree(message); } - zval_dtor(&local_zv_tz); + zval_ptr_dtor_str(&local_zv_tz); delete timeZone; return NULL; } } - zval_dtor(&local_zv_tz); + zval_ptr_dtor_str(&local_zv_tz); return timeZone; } |