Re: [PATCH V2 4/5] git-grep: Learn PCRE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/5/5 Junio C Hamano <gitster@xxxxxxxxx>:
> MichaÅ Kiedrowicz <michal.kiedrowicz@xxxxxxxxx> writes:
>
>> @@ -33,6 +39,8 @@ struct grep_pat {
>> Â Â Â size_t patternlen;
>> Â Â Â enum grep_header_field field;
>> Â Â Â regex_t regexp;
>> + Â Â pcre *pcre_regexp;
>> + Â Â pcre_extra *extra;
>
> I don't think pcre will forever stay the _only_ thing that wants to hook
> an extra information to this structure. ÂThat is why I included "pcre_" in
> the field name in my earlier "how about doing it this way" suggestion.

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.

Bert
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]