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

Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())

Daniel Shahaf wrote:
> > > This probably is a good idea, although the intermediate state where this
> > > has been only partly done is likely to be a bit of a mess.

Starting out with a simple typedef would at least add documentation and
allow an incremental approach. Would still need to add .v everywhere en
masse when going to a struct, though.

I did some work on a code base that had a convention of uint8_t*
for UTF-8. Seemed to work well as far as I could tell.

For the history file we should perhaps consider not using locale
dependent metafied strings. UTF-8 with an overlong encoding for a null
perhaps? grep etc might still not like the overlong null but they should
be rarer.

> allocated relative to each other, e.g., if the code assumes that
> «ary[1] - ary[0] == 1+strlen(ary[0])» or otherwise uses the values of

Even with char**, that condition is only likely if the array was
created with a literal assignment. And it is easy to test for
problems by forcing the size of the struct and running the test


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