about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2005-01-22 16:26:32 +0000
committerClint Adams <clint@users.sourceforge.net>2005-01-22 16:26:32 +0000
commit8ae8a91b8b34514f3b3d5f695e6d5658cc875a66 (patch)
tree394ace3bd7d7b56c338ea2ebfd06f3966b7e0a7e /Src
parent92a3a287693dc9d4812eca736e6997c9a4003e2a (diff)
downloadzsh-8ae8a91b8b34514f3b3d5f695e6d5658cc875a66.tar.gz
zsh-8ae8a91b8b34514f3b3d5f695e6d5658cc875a66.tar.xz
zsh-8ae8a91b8b34514f3b3d5f695e6d5658cc875a66.zip
* 20736: Src/Zle/zle_utils.c: change zlegetline() to return a metafied string.
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_utils.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c
index d769e8363..3696d781b 100644
--- a/Src/Zle/zle_utils.c
+++ b/Src/Zle/zle_utils.c
@@ -72,14 +72,11 @@ sizeline(int sz)
 
 /*
  * Insert a character, called from main shell.
- *
- * WCHAR: type is wrong, should be a genuine wide character,
- * when available in the caller.
  */
 
 /**/
 mod_export void
-zleaddtoline(int chr)
+zleaddtoline(ZLE_CHAR_T chr)
 {
     spaceinline(1);
     zleline[zlecs++] = chr;
@@ -109,15 +106,13 @@ zlegetline(int *ll, int *cs)
     }
 
     *ll = mb_len;
-
-    return (unsigned char *)s;
 #else
     *ll = zlell;
     *cs = zlecs;
 
     s = ztrdup(zleline);
-    return (unsigned char *)s;
 #endif
+    return (unsigned char *) metafy((char *) s, zlell, META_REALLOC);
 }