mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-30 05:40:58 +01:00
12040: typeset -r bug
This commit is contained in:
parent
122e46b406
commit
12fd5d0065
2 changed files with 8 additions and 1 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
2000-06-22 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||||
|
|
||||||
|
* 12040: Src/builtin.c: typeset -r on existing parameter set
|
||||||
|
the readonly flag before assigning any value on the same command
|
||||||
|
line.
|
||||||
|
|
||||||
2000-06-22 Bart Schaefer <schaefer@zsh.org>
|
2000-06-22 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* 12039: Test/comptest: Use "compinit -u" to avoid a possible
|
* 12039: Test/comptest: Use "compinit -u" to avoid a possible
|
||||||
|
|
|
||||||
|
|
@ -1622,7 +1622,7 @@ typeset_single(char *cname, char *pname, Param pm, int func,
|
||||||
arrfixenv(pm->nam, x);
|
arrfixenv(pm->nam, x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pm->flags = (pm->flags | on) & ~(off | PM_UNSET);
|
pm->flags = (pm->flags | (on & ~PM_READONLY)) & ~(off | PM_UNSET);
|
||||||
/* This auxlen/pm->ct stuff is a nasty hack. */
|
/* This auxlen/pm->ct stuff is a nasty hack. */
|
||||||
if ((on & (PM_LEFT | PM_RIGHT_B | PM_RIGHT_Z | PM_INTEGER |
|
if ((on & (PM_LEFT | PM_RIGHT_B | PM_RIGHT_Z | PM_INTEGER |
|
||||||
PM_EFLOAT | PM_FFLOAT)) &&
|
PM_EFLOAT | PM_FFLOAT)) &&
|
||||||
|
|
@ -1643,6 +1643,7 @@ typeset_single(char *cname, char *pname, Param pm, int func,
|
||||||
zwarnnam(cname, "can't assign new value for array %s", pname, 0);
|
zwarnnam(cname, "can't assign new value for array %s", pname, 0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
pm->flags |= (on & PM_READONLY);
|
||||||
return pm;
|
return pm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue