Re: [pcre-dev] pcretest in 8.20

Página superior
Eliminar este mensaje
Autor: xgl001
Fecha:  
A: pcre-dev
Asunto: Re: [pcre-dev] pcretest in 8.20

> JIT is also used by pcregrep.


Yes but pcregrep is coded with multiple #ifdef SUPPORT_PCREGREP_JIT,
a new conditional established in config.h for that program.
It builds just fine without SUPPORT_PCREGREP_JIT even when the JIT
functions were (wrongly) not compiled in the base library.

During a transition these #defines left me thinking of what to do
from the perspective of programs using PCRE (vs. building PCRE).
They see pcre.h but not PCRE's own config.h for SUPPORT_JIT.
For the transition I've temporarily changed to:

#ifdef PCRE_INFO_JIT
    pcre_free_study (our_study_ptr);
#else
    pcre_free (our_study_ptr);
#endif


Code built with a pcre.h version less than 8.20 must use pcre_free().
Newer code should from now on use pcre_free_study() for releasing
a study allocation, and continue to use pcre_free() for
pcre_compile() and pcre_compile2() allocations.

All's good, and thanks again.