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

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

On Jun 7, 12:53pm, Oliver Kiddle wrote:
} 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?

The main problem is that there is assumed to be a mapping from bit
positions to indexes in the TYPESET_OPTSTR string.  At some point we
started adding PM_FLAGS at the opt of the range to mean things other
than what could be assigned via "typeset -C" for some value of C,
and now the stack has grown down to meet the heap, so to speak.

So we'd have to renumber everything to move to a 64-bit representation,
opening up that space in the middle again.

This, by the way, is an example of why it's very difficult to build zsh
modules outside the tree that can be re-used across zsh versions; there
are lots of cases (wordcode being another example) where values that are
built into a module at time T could be dangerously wrong for a shell
compiled at T+N.

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