aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-05-17 14:17:01 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-05-17 14:17:01 -0700
commit286c60bc9d1b692b650bd0c37a6da635e99f119f (patch)
tree0afbe223a384e7562e94b306a91d1f89ae724330 /common.h
parentc26d317da5950645590fecf45c907f35ba0462bb (diff)
Correctly handle mixing named arguments with function name
Before this fix, `function -a arg1 name1` would produce a function named 'arg1'. After this fix, it will produce a function named 'name'. See #2068 for more.
Diffstat (limited to 'common.h')
-rw-r--r--common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/common.h b/common.h
index a4bee08f..f0d55894 100644
--- a/common.h
+++ b/common.h
@@ -696,6 +696,7 @@ void append_formatv(wcstring &str, const wchar_t *format, va_list ap);
*/
const wchar_t *wcsvarname(const wchar_t *str);
+const wchar_t *wcsvarname(const wcstring &str);
/**
@@ -704,7 +705,7 @@ const wchar_t *wcsvarname(const wchar_t *str);
\return null if this is a valid name, and a pointer to the first invalid character otherwise
*/
-const wchar_t *wcsfuncname(const wchar_t *str);
+const wchar_t *wcsfuncname(const wcstring &str);
/**
Test if the given string is valid in a variable name