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

Re: [PATCH 3/3] Constify two local variables.



On Nov 30,  4:42pm, Peter Stephenson wrote:
}
} As Bart says, setfn() expects a permanently allocated values; if it
} doesn't neeed it, it's up to the setfn in question to convert the value
} and then free what's passed in.

Thinking about it, it is quite likely that this makes it impossible to
optimize in the way Daniel wants.  At a very low level, we can't swap
values into an existing (char**) representing an array parameter.  All
the setfn() implementations would have to be updated to notice when
the pointer passed in is the same as the pointer already in the param
struct and skip the free, or something like that.



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