Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: One possible answer to typeset vs. unset



On Fri, Dec 4, 2020 at 7:49 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> The scalar struct param of a tied pair stores a direct pointer to the
> internal array value of the array struct param, and upon assignment
> modifies it without referring to the containing struct.
>
> I think this can be fixed but I don't want it to become inefficient.

Fix for this is now pushed to the declarednull branch.  It requires an
extra getnode() the first time a tied scalar is assigned after being
declared, and only when both the scalar and the array were declared
uninitialized.  So unless one is repeatedly creating/discarding tied
pairs, it shouldn't make much difference.




Messages sorted by: Reverse Date, Date, Thread, Author