Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug with associative arrays(?)
- X-seq: zsh-workers 5162
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Bug with associative arrays(?)
- Date: Tue, 02 Feb 1999 09:36:29 +0100
- In-reply-to: "Sven Wischnowsky"'s message of "Tue, 02 Feb 1999 09:04:23 NFT." <199902020804.JAA08469@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Sven Wischnowsky wrote:
> % typeset -A foo
> % foo[a]=1
> % foo[b]=2
> % echo $foo
> 1 2
> % foo=bar
> % echo $foo
> 1 2 # Oops?
That's the patch of Bart's that keeps getting missed out of my
versions. It should now look something like this:
--- ../patched/zsh-3.1.5-pws-5/Src/params.c Wed Jan 13 00:20:25 1999
+++ ./Src/params.c Sun Jan 24 10:25:10 1999
@@ -1500,7 +1500,7 @@
} else {
if (!(v = getvalue(&s, 1)))
createparam(t, PM_SCALAR);
- else if (PM_TYPE(v->pm->flags) == PM_ARRAY &&
+ else if ((PM_TYPE(v->pm->flags) & (PM_ARRAY|PM_HASHED)) &&
!(v->pm->flags & (PM_SPECIAL|PM_TIED)) && unset(KSHARRAYS)) {
unsetparam(t);
createparam(t, PM_SCALAR);
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author