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

Re: [PATCH][RFC] check for heap memory in zfree()

Bart Schaefer wrote:
> Any objections to my committing my patch?  With one additional tweak
> to call zheapptr() before zarrdup() in the builtin.c hunk.

I think it's OK.

> schaefer[514] typeset -T DIRSTACK dirstack
> typeset: dirstack: can't change type of a special parameter
> IMO a unique array is a distinct type from an ordinary array.

I'm not convinced about that.  I think it's just a tidying up operation
performed on the value.

> Some of our quacking and waddling parameters are already dog-paddling.
> For example, although you can (without getting warnings) set the -LRZ
> options on any array, they don't have any effect except to make the
> array show up in "typeset -LRZ" output.

That's a bug, probably, although it might need care fixing (does the
flag apply if the array is about to be joined?)

> The way to fix
> that is to require that the parameter's rules conform to the internal
> structure it represents, not the other way around.

Yes, but I think the correspondence can sometimes be made more logical.
It doesn't make sense to have dirstack an integer, but it does makes
sense to have it contain unique elements.

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070

To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

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