mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix 'typeset -p' output of compound array types (#453)
This bugfix was backported from ksh93v- 2012-10-04. The bug fixed by this change is one that causes 'typeset -p' to omit the -C flag when listing compound arrays belonging to a type: $ typeset -T Foo_t=(compound -a bar) $ Foo_t baz $ typeset -p baz.bar typeset -a baz.bar='' # This should be 'typeset -C -a' src/cmd/ksh93/sh/nvtype.c: - Backport change from 93v- 2012-10-04 that sets the array nvalue to a pointer named Null (which is "") in nv_mktype(), then to Empty in fixnode(). - Change the Null name from the 93v- code to AltEmpty to avoid misleading code readers into thinking that it's a null pointer. src/cmd/ksh93/tests/types.sh: - Backport the relevant 93v- changes to the types regression tests. Co-authored-by: Martijn Dekker <martijn@inlv.org>
This commit is contained in:
parent
787058bdbf
commit
7d4c7d9156
3 changed files with 25 additions and 6 deletions
11
NEWS
11
NEWS
|
@ -14,10 +14,13 @@ Any uppercase BUG_* names are modernish shell bug IDs.
|
|||
an incompletely defined 'foo_t' built-in comamnd that will crash the shell
|
||||
when used. Instead, it is now silently ignored for backwards compatibility.
|
||||
|
||||
- A bug in which the output of a two dimensional sparse indexed array would
|
||||
cause the second subscript to be treated as an associative array when read
|
||||
back in has been fixed. Elements that are sparse indexed arrays are now
|
||||
prefixed with "typeset -a".
|
||||
- Compound arrays belonging to a type created with 'typeset -T' now have
|
||||
their -C attribute preserved in the output of 'typeset -p'.
|
||||
|
||||
- A bug has been fixed in which the 'typeset -p' output of a two-dimensional
|
||||
sparse indexed array would cause the second subscript to be treated as an
|
||||
associative array when read back in by the shell. Elements that are sparse
|
||||
indexed arrays are now prefixed with "typeset -a".
|
||||
|
||||
2022-02-05:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue