summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2012-06-06 21:54:08 +0200
committerChristian Persch <chpe@gnome.org>2012-07-01 14:00:11 +0200
commitd9e8d3e0f0fc00435b161dd3dfb1b8727922ba00 (patch)
tree787a83284b20c1a25b9f37206c52f80b7b9faa2c /glib
parent3173fca9cc520785f82e602fe830c220c2d1820f (diff)
downloadglib-d9e8d3e0f0fc00435b161dd3dfb1b8727922ba00.tar.gz
regex: Fix PCRE error code conversion
Use the shifted error codes for comparisions. https://bugzilla.gnome.org/show_bug.cgi?id=677578
Diffstat (limited to 'glib')
-rw-r--r--glib/gregex.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/glib/gregex.c b/glib/gregex.c
index bf82bd14d..5776077b0 100644
--- a/glib/gregex.c
+++ b/glib/gregex.c
@@ -396,36 +396,36 @@ translate_compile_error (gint *errcode, const gchar **errmsg)
*errmsg = _("\\g is not followed by a braced name or an optionally "
"braced non-zero number");
break;
- case 11:
+ case 111:
*errcode = G_REGEX_ERROR_INTERNAL;
*errmsg = _("unexpected repeat");
break;
- case 23:
+ case 123:
*errcode = G_REGEX_ERROR_INTERNAL;
*errmsg = _("code overflow");
break;
- case 52:
+ case 152:
*errcode = G_REGEX_ERROR_INTERNAL;
*errmsg = _("overran compiling workspace");
break;
- case 53:
+ case 153:
*errcode = G_REGEX_ERROR_INTERNAL;
*errmsg = _("previously-checked referenced subpattern not found");
break;
- case 16:
+ case 116:
/* This should not happen as we never pass a NULL erroffset */
g_warning ("erroffset passed as NULL");
*errcode = G_REGEX_ERROR_COMPILE;
break;
- case 17:
+ case 117:
/* This should not happen as we check options before passing them
* to pcre_compile2() */
g_warning ("unknown option bit(s) set");
*errcode = G_REGEX_ERROR_COMPILE;
break;
- case 32:
- case 44:
- case 45:
+ case 132:
+ case 144:
+ case 145:
/* These errors should not happen as we are using an UTF8-enabled PCRE
* and we do not check if strings are valid */
g_warning ("%s", *errmsg);