Re: [pcre-dev] Forcing study to return with something

Página superior
Eliminar este mensaje
Autor: Philip Hazel
Fecha:  
A: Zoltán Herczeg
Cc: pcre-dev
Asunto: Re: [pcre-dev] Forcing study to return with something
On Sat, 11 Aug 2012, Zoltán Herczeg wrote:

> it is inconvenient for several uses cases, that study sometimes return
> with something and sometimes not, and we need to manually allocate a
> pcre_extra. Shall we add a flag which forces it to return with a
> plain, empty, pcre_extra if it would return with NULL (and there was
> no error of course)?


I have no objection. Indeed, I am currently working on pcregrep (fixing
various oddities with --include and --exclude) and its code could
perhaps be made a bit tidier if this flag exists. What shall we call it?
PCRE_STUDY_NEVER_NULL? PCRE_STUDY_NONULL? PCRE_STUDY_FORCE_ALLOC? Maybe
NONULL is clearest, but I don't really mind (and maybe there's something
better).

Philip

--
Philip Hazel