[php-src] master: ext/intl: use RETURN_NEW_STR for intl_get*id_windows_id(). (#18501)
Author: David CARLIER (devnexen)
Committer: GitHub (web-flow)
Pusher: devnexen
Date: 2025-05-04T21:44:39+01:00
Commit: https://github.com/php/php-src/commit/9ac5b04487164b2921b92110d1b08ffa0a4b5c95
Raw diff: https://github.com/php/php-src/commit/9ac5b04487164b2921b92110d1b08ffa0a4b5c95.diff
ext/intl: use RETURN_NEW_STR for intl_get*id_windows_id(). (#18501)
for non interned return values.
Changed paths:
M ext/intl/timezone/timezone_methods.cpp
Diff:
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp
index f652e9000c40..6ff0cf513779 100644
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -646,7 +646,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_windows_id)
error = U_ZERO_ERROR;
winID = intl_convert_utf16_to_utf8(uWinID.getBuffer(), uWinID.length(), &error);
INTL_CHECK_STATUS(error, "could not convert time zone id to UTF-8");
- RETURN_STR(winID);
+ RETURN_NEW_STR(winID);
}
/* }}} */
@@ -684,6 +684,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_id_for_windows_id)
error = U_ZERO_ERROR;
id = intl_convert_utf16_to_utf8(uID.getBuffer(), uID.length(), &error);
INTL_CHECK_STATUS(error, "could not convert time zone id to UTF-8");
- RETURN_STR(id);
+ RETURN_NEW_STR(id);
}
/* }}} */
Thread (1 message)
- David CARLIER via GitHub