diff options
author | 2015-05-17 14:17:01 -0700 | |
---|---|---|
committer | 2015-05-17 14:17:01 -0700 | |
commit | 286c60bc9d1b692b650bd0c37a6da635e99f119f (patch) | |
tree | 0afbe223a384e7562e94b306a91d1f89ae724330 /common.h | |
parent | c26d317da5950645590fecf45c907f35ba0462bb (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.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |