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())
- X-seq: zsh-workers 39645
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
- Date: Sat, 15 Oct 2016 01:04:58 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1476486298; bh=OXtHSeBXVgaBz3Ai2RK75mQ6Qb1VeOptgASwBE8mGtE=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=tT+fM8NAcP2yxkoi4VMLmf5yBwTNPfemSgdu+rGwHjkW7QG5s6c7zZU1Yw9e/JbnzGnvRFQIaPHPErTQIO9ClnnPxyUGzEgbSOroRHcf80ZDWBSGed3QTPoP1n/xOOGX7xDJax32x5dE7M6rKOWiGB0PQlaf9yNGIycXuuElEW1VeqF6j0C+yEwgEqMzaOSEGYiUUFuFwXd9DxoQZ+hSXB6kTYsmJp3jKvJiJ3+k9zup5GpdPqW8v/q2HF2VR3mYHc1cZ4GIb6TyFLR19qjPpFtJyNdE0deguOQbwtoLMsv29QlGtBvcCNBw1ZxhRoNVF0sdgE2SioeT6ekGt05LbA==
- In-reply-to: <20161014063625.GC11115@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBEjPJMtV59CrN6LmrDaoGqfa_DZqwo3Y9HK=+0od7ycA@mail.gmail.com> <CAKc7PVCAR2yTJGgdBbvTp=mBC0ZrXcVWW0DE_U26TezSTNdd=A@mail.gmail.com> <CAKc7PVB=485r3nRz_pP3A-k-oq2pOp5qYUK7pE1VEApXb0pR1g@mail.gmail.com> <CAKc7PVDof_GEuoSv7pg8c1=spXfDkWopP5VR8dVHg-bxXVES1g@mail.gmail.com> <CAKc7PVCRtBBVONgiExopYYUv7x4-HN_QEYk-05aoqZihiCRgMw@mail.gmail.com> <CAH+w=7a7jc0Q2=M9aG5mttbazxfsHB-Cz=WwJzCvz_SdnbApRw@mail.gmail.com> <CGME20161011065321eucas1p22afaabbe1f17f26a1b3507619ed1d96f@eucas1p2.samsung.com> <20161011065105.GB16819@fujitsu.shahaf.local2> <20161013112251.329c0dbf@pwslap01u.europe.root.pri> <CAH+w=7ZArSYVkjcrbAmkeiWsmpiufbj9+DeNhORgKtYEXEkn7Q@mail.gmail.com> <20161014063625.GC11115@fujitsu.shahaf.local2>
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
cases.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author