After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679193 - update included pcre to 8.31
update included pcre to 8.31
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gregex
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-06-30 13:22 UTC by Christian Persch
Modified: 2012-07-07 20:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
regex: Enable fixed test (1.23 KB, patch)
2012-06-30 13:23 UTC, Christian Persch
accepted-commit_now Details | Review
regex: Add new GRegexError code from PCRE 8.31 (2.64 KB, patch)
2012-06-30 13:23 UTC, Christian Persch
accepted-commit_now Details | Review
regex: Add accessor to get max length of lookbehind characters (2.62 KB, patch)
2012-06-30 13:23 UTC, Christian Persch
needs-work Details | Review

Description Christian Persch 2012-06-30 13:22:51 UTC
This is mostly a minor update. The unicode 6.1 update is now upstream reducing our diff to upstream; the rest is mostly bug fixes (and JIT improvements, so this is a prereq for bug 679155). There's just one bit of new API we want to expose.

I've pushed a wip/pcre-8.31 branch that contains the update to 8.31-RC2, so this can be reviewed now. The commit will of course wait for the 8.31 final being released. The code drop is http://git.gnome.org/browse/glib/commit/?h=wip/pcre-8.31&id=2e137e6899b7a7c33b2bea81d4080338b258074b ; I'm going to attach the rest here.
Comment 1 Christian Persch 2012-06-30 13:23:37 UTC
Created attachment 217723 [details] [review]
regex: Enable fixed test

This problem was fixed in PCRE 8.31, so uncomment the test.
Comment 2 Christian Persch 2012-06-30 13:23:39 UTC
Created attachment 217724 [details] [review]
regex: Add new GRegexError code from PCRE 8.31
Comment 3 Christian Persch 2012-06-30 13:23:43 UTC
Created attachment 217725 [details] [review]
regex: Add accessor to get max length of lookbehind characters

Use PCRE_INFO_MAXLOOKBEHIND to get the length (in characters) of the
longest lookbehind assertion in the pattern.
Comment 4 Matthias Clasen 2012-07-01 01:34:58 UTC
Review of attachment 217723 [details] [review]:

ok
Comment 5 Matthias Clasen 2012-07-01 01:35:31 UTC
Review of attachment 217724 [details] [review]:

ok
Comment 6 Matthias Clasen 2012-07-01 01:37:43 UTC
Review of attachment 217725 [details] [review]:

::: glib/gregex.c
@@ +1527,3 @@
 
+
+/**

Unnecessary extra newline there

@@ +1532,3 @@
+ *
+ * Returns the lentgh of the longest lookbehind assertion in the pattern, in
+ * characters. Returns <literal>0</literal> if the pattern does not

No need for <literal> here, we generally just leave numbers undecorated in text

@@ +1537,3 @@
+ * This information may be useful when doing incremental partial matching; in
+ * that case you should always keep at least this many characters before the
+ * partially matched string.

This is useful documentation - it would be good to xref this from the partial matching flags documentation, maybe.
Comment 7 Matthias Clasen 2012-07-01 01:38:24 UTC
Thanks for all the work you are putting into GRegex, btw. Much appreciated.
Comment 8 Christian Persch 2012-07-07 14:40:45 UTC
PCRE 8.31 has been released; ok to commit this patch series? (Minus the last patch, attachment 217725 [details] [review]. I've fixed the things you pointed out in it, but it turns out that gregex doesn't allow doing this incremental ('multi-segmented' in man:pcrepartial(3) ) partial matching since there's no way to fetch the position of the start of the partial match. And without that g_regex_get_max_lookbehind() doesn't have a use case. So I'll move that to a separate bug.)
Comment 9 Matthias Clasen 2012-07-07 17:43:58 UTC
sure, sounds good