aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.h
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2014-09-25 18:20:03 -0700
committerGravatar Kevin Ballard <kevin@sb.org>2014-09-25 18:20:03 -0700
commit35595dbffdf413694b31da46129432ef345921af (patch)
treee78b379cf7854b1a8402f8da267e8f6d84450c6f /common.h
parentcd4fa518b86ddfb3e946fa4dd69e9e32a58ef81e (diff)
Make escape() return a wcstring
This avoids the potential for leaking the resulting string.
Diffstat (limited to 'common.h')
-rw-r--r--common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/common.h b/common.h
index 7932c870..a5ec50ab 100644
--- a/common.h
+++ b/common.h
@@ -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);
/**