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

Re: PM_ flags (Re: mikachu/badarrays ...)



On Wed, Jun 7, 2017 at 12:53 PM, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> On 30 May, Bart wrote:
>
>> It also appears we've run out of bits for PM_CACHELEN and PM_CHECKEN,
>> the 19 and 20 bit positions are are now occupied by PM_DONTIMPORT_SUID
>> and PM_SINGLE, though I suppose PM_KSHSTORED and PM_ZSHSTORED could do
>> double duty as they won't apply to arrays and functions at once.
>
> Should we perhaps change the flags field in struct param to be a 64-bit
> value to make room for more flags? Can we portably use something like
> uint64_t or is it not that simple?
>
> In addition to more overloading of function/parameter related flags
> there are also some mutually exclusive combinations. For example, only
> one of the PM_TYPE flags can be set so 3 bits could be used in place
> of 5 but it'd need the PM_TYPE mask adding in lots of places and only
> gain us 2 bits. There's also the 32nd bit available but to reliably and
> portably use that do we need to change flags to be an unsigned int?
>
> Oliver

Just to make this clear in case it wasn't, the flags I used in that
branch were only for debugging and not needed for the operation at
all, so there's no urgent need to fix this unless someone wants to add
another flag.

-- 
Mikael Magnusson



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