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

Re: PATCH: _value



Tanaka Akira wrote:

> I wrote _value to complete values for parameter assignments.
> 
> And I found a problem with this.  When I try the completion by _value
> first time, it is failed and "funcstack wrapper with wrong function"
> is displayed.  Since second time, there is no problem.

And thus the parameter module revealed a bug in the function calling
code: it didn't dup the name and when the function was re-defined, the 
name in use by the wrappers was freed.

Bye
 Sven

--- oldsrc/exec.c	Mon Nov  1 09:03:16 1999
+++ Src/exec.c	Tue Nov  2 13:57:30 1999
@@ -3018,7 +3018,7 @@
 		argzero = ztrdup(argzero);
 	    }
 	}
-	runshfunc(list, wrappers, name);
+	runshfunc(list, wrappers, dupstring(name));
 	if (retflag) {
 	    retflag = 0;
 	    breaks = obreaks;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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