zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: typeset -U array; array=(1 2 1) bug
@ 1998-05-08  5:43 Zoltan Hidvegi
  0 siblings, 0 replies; only message in thread
From: Zoltan Hidvegi @ 1998-05-08  5:43 UTC (permalink / raw)
  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;
  	}
      }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-05-08  5:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-08  5:43 PATCH: typeset -U array; array=(1 2 1) bug Zoltan Hidvegi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).