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 677579 - update GRegexError for newer PCRE error codes
update GRegexError for newer PCRE error codes
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gregex
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-06-06 19:59 UTC by Christian Persch
Modified: 2012-07-01 12:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
regex: Update GRegexError with newer PCRE error codes (13.11 KB, patch)
2012-06-06 19:59 UTC, Christian Persch
none Details | Review
regex: Deprecate an obsolete error code (1.53 KB, patch)
2012-06-30 13:03 UTC, Christian Persch
accepted-commit_now Details | Review
regex: Simplify regex compile tests (6.02 KB, patch)
2012-06-30 13:03 UTC, Christian Persch
accepted-commit_now Details | Review
regex: Update GRegexError with newer PCRE error codes (17.45 KB, patch)
2012-06-30 13:03 UTC, Christian Persch
accepted-commit_now Details | Review
regex: Handle PCRE_ERROR_RECURSIONLOOP (718 bytes, patch)
2012-06-30 13:03 UTC, Christian Persch
accepted-commit_now Details | Review

Description Christian Persch 2012-06-06 19:59:15 UTC
The GRegexError enum appears to not have been updated for new useful PCRE errors since PCRE ~ 7.2 .

Attached patch adds the new errors up to 8.30, and rearranges the switch so that most case:s are in numerical order.
Comment 1 Christian Persch 2012-06-06 19:59:38 UTC
Created attachment 215770 [details] [review]
regex: Update GRegexError with newer PCRE error codes

Update the GRegexError enum with new PCRE errors up to PCRE 8.30.
Comment 2 Matthias Clasen 2012-06-07 20:01:46 UTC
Looks reasonable. Do you have tests that trigger these errors ?
Comment 3 Christian Persch 2012-06-07 23:15:57 UTC
Yes, updated patch with tests added pushed as part of the wip/pcre-update branch:

http://git.gnome.org/browse/glib/commit/?h=wip/pcre-update&id=9dca50f5f83352fb9435c80a4d83ff8a35b0ec55
Comment 4 Christian Persch 2012-06-23 21:56:03 UTC
I have an updated patch set that I'll update the branch with soon.
Comment 5 Christian Persch 2012-06-29 06:58:13 UTC
Pushed a new wip/pcre-errors branch. Now includes tests for almost all error codes (some aren't testable sanely).
Comment 6 Christian Persch 2012-06-30 13:03:34 UTC
Created attachment 217701 [details] [review]
regex: Deprecate an obsolete error code

G_REGEX_ERROR_DEFINE_REPETION is dead and never raised by PCRE.
Comment 7 Christian Persch 2012-06-30 13:03:37 UTC
Created attachment 217702 [details] [review]
regex: Simplify regex compile tests

Use a macro instead of repeating the same code over and over again.
Comment 8 Christian Persch 2012-06-30 13:03:41 UTC
Created attachment 217703 [details] [review]
regex: Update GRegexError with newer PCRE error codes

Update the GRegexError enum with new PCRE errors up to PCRE 8.30.
Comment 9 Christian Persch 2012-06-30 13:03:44 UTC
Created attachment 217704 [details] [review]
regex: Handle PCRE_ERROR_RECURSIONLOOP

Was missing from the error conversion routine.
Comment 10 Matthias Clasen 2012-07-01 01:06:07 UTC
Review of attachment 217701 [details] [review]:

sure
Comment 11 Matthias Clasen 2012-07-01 01:06:29 UTC
Review of attachment 217702 [details] [review]:

nice
Comment 12 Matthias Clasen 2012-07-01 01:06:40 UTC
Review of attachment 217701 [details] [review]:

sure
Comment 13 Matthias Clasen 2012-07-01 01:07:34 UTC
Review of attachment 217703 [details] [review]:

looks good
Comment 14 Matthias Clasen 2012-07-01 01:07:50 UTC
Review of attachment 217704 [details] [review]:

sure
Comment 15 Christian Persch 2012-07-01 12:00:52 UTC
All pushed to master.