[pcre-dev] [Bug 1295] add 32-bit library

Startseite
Nachricht löschen
Autor: Christian Persch
Datum:  
To: pcre-dev
Betreff: [pcre-dev] [Bug 1295] add 32-bit library
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1295




--- Comment #13 from Christian Persch (GNOME) <chpe@???> 2012-10-10 13:32:37 ---
(In reply to comment #6)
> I would rename these:
> PCRE_INFO_FIRSTLITERAL -> This is not true if the character is a multibyte
> data. PCRE_INFO_FIRSTCHAR is better
> PCRE_INFO_FIRSTLITERALSET -> PCRE_INFO_FIRSTCHAR_FLAGS
> PCRE_INFO_LASTLITERAL2 -> This is a required character, and also a character
> fragment in case of a multibyte representation. PCRE_INFO_REQUREDCHAR is better
> PCRE_INFO_LASTLITERAL2SET -> PCRE_INFO_REQUREDCHAR_FLAGS


Since PCRE_INFO_FIRSTCHAR was already taken, I renamed it to
PCRE_INFO_FIRSTCHARACTER[FLAGS] (no underscore before the FLAGS because all the
other are PCRE_INFO_FOOBARBAZ too).

> +#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
>    if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
>  #endif
> I think GCC is clever enough to optimize this if HAS_EXTRALEN is always 0.


So I'll revert those changes and just define HAS_EXTRALEN and GET_EXTRALEN to
0. Minimising the ifdef hell helps keeping the code readable :-)

(In reply to comment #10)
> > I don't mind which way you do it ... do whatever you think is best for
> > you.
>
> If you add the change in smaller patches, check that all of them apply before
> you start to avoid surprises.


That's automatic with git. I'll however do one more and make sure that "make
check" passes after each commit (it did, when I made those commits; just
re-checking to make sure the rebasing to current svn didn't introduce bugs).

So what's missing still?
* pcretest doesn't yet test that the masking of the upper bits in UTF-32 mode
works; I'll add tests for this before committing
* The masking doesn't work in when JITing. I may need a bit of guidance on this
one; I documented that this isn't supported yet for JIT, so I think we can
leave this as-is for the initial commit.

I think it'll hit svn sometime this week.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email