Re: [PATCH v4 2/3] regex: add regexec_buf() that can work on a non NUL-terminated string

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

 



Hi Junio,

On Wed, 21 Sep 2016, Junio C Hamano wrote:

> Johannes Schindelin <johannes.schindelin@xxxxxx> writes:
> 
> > ...
> > Happily, there is an extension to regexec() introduced by the NetBSD
> > project and present in all major regex implementation including
> > Linux', MacOSX' and the one Git includes in compat/regex/: by using
> > the (non-POSIX) REG_STARTEND flag, it is possible to tell the
> > regexec() function that it should only look at the offsets between
> > pmatch[0].rm_so and pmatch[0].rm_eo.
> >
> > That is exactly what we need.
> 
> Wonderful.
> 
> > Since support for REG_STARTEND is so widespread by now, let's just
> > introduce a helper function that uses it, and fall back to allocating
> > and constructing a NUL-terminated when REG_STARTEND is not available.
> 
> I'd somehow reword the last paragraph here, though ;-)

Oh drats. I thought I had prepared the fixed commit messages already :-(

What you have in `pu` as of today looks good.

Ciao,
Dscho



[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]