Bert Wesarg [off-list ref] writes:
I would also suggest to share the space between regex_t and the
(pcre*,pcre_extra*) tuple, like i did in my patch titled 'prepare for
re-using the space...' from May 2. Sacrificing one bit to indicate
that this is a pcre compiled pattern should not hurt, because there
are bits left.
It might be an excessive over-engineering, though.
Unlike "struct object" that need to stay in-core and grow proportionally
to the size of the history being traversed, grep_pat corresponds to one
item from the pattern specified on the command line. If it makes the code
harder to read because we end up constantly dereferencing union members
(and no, "#define pcre_regexp u.pcre_regexp" is not a solution), the
resulting 8-to-16 bytes saved per pattern may not be worth it.