Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PATCH: typeset -U array; array=(1 2 1) bug

0 views
Skip to first unread message

Zoltan Hidvegi

unread,
May 8, 1998, 3:00:00 AM5/8/98
to Zsh hacking and development

I'll try to send in the patches left in my queue missing from 3.1.3.
Here is the first one. It fixes the bug:

typeset -U array; array=(1 2 1)

creates a non-unique array.

Zoli

*** Src/params.c 1997/09/19 05:34:49 3.1.3.3
--- Src/params.c 1997/09/20 06:37:55 3.1.3.4
***************
*** 1047,1054 ****
createparam(t, PM_ARRAY);
else if (PM_TYPE(v->pm->flags) != PM_ARRAY &&
!(v->pm->flags & PM_SPECIAL)) {
unsetparam(t);
! createparam(t, PM_ARRAY);
v = NULL;
}
}
--- 1047,1055 ----
createparam(t, PM_ARRAY);
else if (PM_TYPE(v->pm->flags) != PM_ARRAY &&
!(v->pm->flags & PM_SPECIAL)) {
+ int uniq = v->pm->flags & PM_UNIQUE;
unsetparam(t);
! createparam(t, PM_ARRAY | uniq);
v = NULL;
}
}


0 new messages