Make escape() return a wcstring

This avoids the potential for leaking the resulting string.
This commit is contained in:
Kevin Ballard
2014-09-25 18:20:03 -07:00
parent cd4fa518b8
commit 35595dbffd
7 changed files with 23 additions and 33 deletions

View File

@@ -808,10 +808,10 @@ void print_stderr(const wcstring &str);
\param in The string to be escaped
\param flags Flags to control the escaping
\return The escaped string, or 0 if there is not enough memory
\return The escaped string
*/
wchar_t *escape(const wchar_t *in, escape_flags_t flags);
wcstring escape(const wchar_t *in, escape_flags_t flags);
wcstring escape_string(const wcstring &in, escape_flags_t flags);
/**