Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bugs on SourceForge
- X-seq: zsh-workers 13837
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: Bugs on SourceForge
- Date: Thu, 29 Mar 2001 11:19:16 +0100
- In-reply-to: Your message of "Thu, 29 Mar 2001 06:53:34 -0000." <1010329065334.ZM17730@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
> We should at least address 219457 and 219459 before 4.0.1, not because I
> submitted them, but because they're shell-crashers.
The simplest way of fixing the problem of typesetting parameters before
they are autoloaded is to forbid it. I can't see any time it could
conceivably be useful to allow it, since the whole point of autoloaded
parameters is that they get set up when they're loaded, and it's up to
zmodload, not typeset, to turn off autoloading.
Index: Src/builtin.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v
retrieving revision 1.42
diff -u -r1.42 builtin.c
--- Src/builtin.c 2001/02/14 23:36:23 1.42
+++ Src/builtin.c 2001/03/29 10:16:11
@@ -1628,10 +1628,16 @@
if ((tc = chflags && chflags != (PM_EFLOAT|PM_FFLOAT)))
usepm = 0;
}
- if (tc && (pm->flags & PM_SPECIAL)) {
- zerrnam(cname, "%s: can't change type of a special parameter",
- pname, 0);
- return NULL;
+ if (tc){
+ if (pm->flags & PM_SPECIAL) {
+ zerrnam(cname, "%s: can't change type of a special parameter",
+ pname, 0);
+ return NULL;
+ } else if (pm->flags & PM_AUTOLOAD) {
+ zerrnam(cname, "%s: can't change type of autoloaded parameter",
+ pname, 0);
+ return NULL;
+ }
}
/*
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author