Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: minor zle_utils fix



I think this should be uncontroversial.  Is zlegetline() meant to
convert zleline to a UTF-8 string and return that?  Then the caller will
need to free it?

Index: Src/Zle/zle_utils.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_utils.c,v
retrieving revision 1.11
diff -u -r1.11 zle_utils.c
--- Src/Zle/zle_utils.c	14 Jan 2005 13:05:25 -0000	1.11
+++ Src/Zle/zle_utils.c	16 Jan 2005 16:17:13 -0000
@@ -67,7 +67,7 @@
 sizeline(int sz)
 {
     while (sz > linesz)
-	zleline = (unsigned char *)realloc(zleline, (linesz *= 4) + 2);
+	zleline = (ZLE_STRING_T)realloc(zleline, (linesz *= 4) + 2);
 }
 
 /*
@@ -85,11 +85,6 @@
     zleline[zlecs++] = chr;
 }
 
-/*
-    return zleline;
-    return zleline;
- */
-
 /**/
 mod_export unsigned char *
 zlegetline(int *ll, int *cs)



Messages sorted by: Reverse Date, Date, Thread, Author