summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-03-12 16:53:51 +0300
committerDmitry Stogov <dmitry@zend.com>2015-03-12 16:53:51 +0300
commit8633685675692e9a926cf9f97b1c406c37497ddf (patch)
treee0c82ad945a575f90f90dfd402c7e2dc013a3acc /ext/date/php_date.c
parent0e30c543ec8e6c371e0aef6e125e7b90f4b1b790 (diff)
downloadphp-git-8633685675692e9a926cf9f97b1c406c37497ddf.tar.gz
Use specialized macro for string zval creation
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index ffdea3d090..1946dacda1 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1681,7 +1681,7 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
if (real_len && real_len != buf_len) {
buf = zend_string_realloc(buf, real_len, 0);
- RETURN_STR(buf);
+ RETURN_NEW_STR(buf);
}
zend_string_free(buf);
RETURN_FALSE;
@@ -3742,7 +3742,7 @@ PHP_FUNCTION(timezone_name_get)
abs(utc_offset / 60),
abs((utc_offset % 60)));
- RETURN_STR(tmpstr);
+ RETURN_NEW_STR(tmpstr);
}
break;
case TIMELIB_ZONETYPE_ABBR:
@@ -4681,7 +4681,7 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su
switch (retformat) {
case SUNFUNCS_RET_STRING:
retstr = strpprintf(0, "%02d:%02d", (int) N, (int) (60 * (N - (int) N)));
- RETURN_STR(retstr);
+ RETURN_NEW_STR(retstr);
break;
case SUNFUNCS_RET_DOUBLE:
RETURN_DOUBLE(N);