diff options
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index be7c579d57..c2f4ffdc8f 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2826,7 +2826,7 @@ PHP_METHOD(DateTime, __construct) ZEND_PARSE_PARAMETERS_END(); zend_replace_error_handling(EH_THROW, NULL, &error_handling); - php_date_initialize(Z_PHPDATE_P(&EX(This)), time_str, time_str_len, NULL, timezone_object, 1); + php_date_initialize(Z_PHPDATE_P(ZEND_THIS), time_str, time_str_len, NULL, timezone_object, 1); zend_restore_error_handling(&error_handling); } /* }}} */ @@ -2848,7 +2848,7 @@ PHP_METHOD(DateTimeImmutable, __construct) ZEND_PARSE_PARAMETERS_END(); zend_replace_error_handling(EH_THROW, NULL, &error_handling); - php_date_initialize(Z_PHPDATE_P(&EX(This)), time_str, time_str_len, NULL, timezone_object, 1); + php_date_initialize(Z_PHPDATE_P(ZEND_THIS), time_str, time_str_len, NULL, timezone_object, 1); zend_restore_error_handling(&error_handling); } /* }}} */ @@ -2992,7 +2992,7 @@ PHP_METHOD(DateTimeImmutable, __set_state) */ PHP_METHOD(DateTime, __wakeup) { - zval *object = &EX(This); + zval *object = ZEND_THIS; php_date_obj *dateobj; HashTable *myht; @@ -3269,7 +3269,7 @@ PHP_METHOD(DateTimeImmutable, modify) char *modify; size_t modify_len; - object = &EX(This); + object = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &modify, &modify_len) == FAILURE) { RETURN_FALSE; } @@ -3323,7 +3323,7 @@ PHP_METHOD(DateTimeImmutable, add) { zval *object, *interval, new_object; - object = &EX(This); + object = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &interval, date_ce_interval) == FAILURE) { RETURN_FALSE; } @@ -3380,7 +3380,7 @@ PHP_METHOD(DateTimeImmutable, sub) { zval *object, *interval, new_object; - object = &EX(This); + object = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &interval, date_ce_interval) == FAILURE) { RETURN_FALSE; } @@ -3485,7 +3485,7 @@ PHP_METHOD(DateTimeImmutable, setTimezone) zval *object, new_object; zval *timezone_object; - object = &EX(This); + object = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &timezone_object, date_ce_timezone) == FAILURE) { RETURN_FALSE; } @@ -3571,7 +3571,7 @@ PHP_METHOD(DateTimeImmutable, setTime) zval *object, new_object; zend_long h, i, s = 0, ms = 0; - object = &EX(This); + object = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll|ll", &h, &i, &s, &ms) == FAILURE) { RETURN_FALSE; } @@ -3621,7 +3621,7 @@ PHP_METHOD(DateTimeImmutable, setDate) zval *object, new_object; zend_long y, m, d; - object = &EX(This); + object = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &y, &m, &d) == FAILURE) { RETURN_FALSE; } @@ -3675,7 +3675,7 @@ PHP_METHOD(DateTimeImmutable, setISODate) zval *object, new_object; zend_long y, w, d = 1; - object = &EX(This); + object = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll|l", &y, &w, &d) == FAILURE) { RETURN_FALSE; } @@ -3724,7 +3724,7 @@ PHP_METHOD(DateTimeImmutable, setTimestamp) zval *object, new_object; zend_long timestamp; - object = &EX(This); + object = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", ×tamp) == FAILURE) { RETURN_FALSE; } @@ -3851,7 +3851,7 @@ PHP_METHOD(DateTimeZone, __construct) ZEND_PARSE_PARAMETERS_END(); zend_replace_error_handling(EH_THROW, NULL, &error_handling); - tzobj = Z_PHPTIMEZONE_P(&EX(This)); + tzobj = Z_PHPTIMEZONE_P(ZEND_THIS); timezone_initialize(tzobj, ZSTR_VAL(tz), ZSTR_LEN(tz)); zend_restore_error_handling(&error_handling); } @@ -3906,7 +3906,7 @@ PHP_METHOD(DateTimeZone, __set_state) * */ PHP_METHOD(DateTimeZone, __wakeup) { - zval *object = &EX(This); + zval *object = ZEND_THIS; php_timezone_obj *tzobj; HashTable *myht; @@ -4309,7 +4309,7 @@ PHP_METHOD(DateInterval, __construct) zend_replace_error_handling(EH_THROW, NULL, &error_handling); if (date_interval_initialize(&reltime, ZSTR_VAL(interval_string), ZSTR_LEN(interval_string)) == SUCCESS) { - php_interval_obj *diobj = Z_PHPINTERVAL_P(&EX(This)); + php_interval_obj *diobj = Z_PHPINTERVAL_P(ZEND_THIS); diobj->diff = reltime; diobj->initialized = 1; } @@ -4407,7 +4407,7 @@ PHP_METHOD(DateInterval, __set_state) */ PHP_METHOD(DateInterval, __wakeup) { - zval *object = &EX(This); + zval *object = ZEND_THIS; php_interval_obj *intobj; HashTable *myht; @@ -4583,7 +4583,7 @@ PHP_METHOD(DatePeriod, __construct) } } - dpobj = Z_PHPPERIOD_P(&EX(This)); + dpobj = Z_PHPPERIOD_P(ZEND_THIS); dpobj->current = NULL; if (isostr) { @@ -4657,7 +4657,7 @@ PHP_METHOD(DatePeriod, getStartDate) return; } - dpobj = Z_PHPPERIOD_P(&EX(This)); + dpobj = Z_PHPPERIOD_P(ZEND_THIS); php_date_instantiate(dpobj->start_ce, return_value); dateobj = Z_PHPDATE_P(return_value); @@ -4684,7 +4684,7 @@ PHP_METHOD(DatePeriod, getEndDate) return; } - dpobj = Z_PHPPERIOD_P(&EX(This)); + dpobj = Z_PHPPERIOD_P(ZEND_THIS); if (!dpobj->end) { return; @@ -4715,7 +4715,7 @@ PHP_METHOD(DatePeriod, getDateInterval) return; } - dpobj = Z_PHPPERIOD_P(&EX(This)); + dpobj = Z_PHPPERIOD_P(ZEND_THIS); php_date_instantiate(date_ce_interval, return_value); diobj = Z_PHPINTERVAL_P(return_value); @@ -5259,7 +5259,7 @@ PHP_METHOD(DatePeriod, __set_state) */ PHP_METHOD(DatePeriod, __wakeup) { - zval *object = &EX(This); + zval *object = ZEND_THIS; php_period_obj *period_obj; HashTable *myht; |