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

Re: PATCH: failed autoload

Bart Schaefer wrote:
> On Jul 1,  7:25pm, Peter Stephenson wrote:
> } It can't be correct that if an autoload fails beacause of a syntax error
> } that the function returns 0.
> } 
> } I don't see how it can be useful to define the function with an empty
> } function body, either.
> I'm sure there was a reason for this, at one time.  It was introduced in
> zsh-workers/9332 by Sven, with the log message "Use word code instead of
> structs for passing executable chunks around."

I'm not sure that's quite the same issue... Before, we would have
returned a NULL in many cases where now we return a pointer to a dummy
eprog.  However, the caller of the function I patched is using NULL to
signal an error (see the `return NULL' just a couple of lines higher).
So it seems to me likely that this got changed incorrectly to flag `no
code present but no error' instead of `failed to load function, error'.

Please contradict if you think my logic is wrong.

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070

The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
If you received this in error, please contact the sender and 
delete the material from any computer.

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