GNOME Bugzilla – Bug 677579
update GRegexError for newer PCRE error codes
Last modified: 2012-07-01 12:00:52 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.
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.
Looks reasonable. Do you have tests that trigger these errors ?
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
I have an updated patch set that I'll update the branch with soon.
Pushed a new wip/pcre-errors branch. Now includes tests for almost all error codes (some aren't testable sanely).
Created attachment 217701 [details] [review] regex: Deprecate an obsolete error code G_REGEX_ERROR_DEFINE_REPETION is dead and never raised by PCRE.
Created attachment 217702 [details] [review] regex: Simplify regex compile tests Use a macro instead of repeating the same code over and over again.
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.
Created attachment 217704 [details] [review] regex: Handle PCRE_ERROR_RECURSIONLOOP Was missing from the error conversion routine.
Review of attachment 217701 [details] [review]: sure
Review of attachment 217702 [details] [review]: nice
Review of attachment 217703 [details] [review]: looks good
Review of attachment 217704 [details] [review]: sure
All pushed to master.