summaryrefslogtreecommitdiff
path: root/glib/gregex.c
diff options
context:
space:
mode:
authorMarco Barisione <marco@barisione.org>2007-11-19 14:06:18 +0000
committerMarco Barisione <mbari@src.gnome.org>2007-11-19 14:06:18 +0000
commit9f86f44826d5494db55c915bc529787f6851f687 (patch)
treee74cd600b113131e3af55115ffd33991929ab4c2 /glib/gregex.c
parentd887ff42ebdb76914b854a40cbd2ae4dc54faf12 (diff)
downloadglib-9f86f44826d5494db55c915bc529787f6851f687.tar.gz
Pass an unsigned long instead of an int to pcre_fullinfo() to avoid
2007-11-19 Marco Barisione <marco@barisione.org> * glib/gregex.c: Pass an unsigned long instead of an int to pcre_fullinfo() to avoid problems on 64-bit systems svn path=/trunk/; revision=5869
Diffstat (limited to 'glib/gregex.c')
-rw-r--r--glib/gregex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/glib/gregex.c b/glib/gregex.c
index d0acc8b47..b5bc6a1ca 100644
--- a/glib/gregex.c
+++ b/glib/gregex.c
@@ -858,6 +858,7 @@ g_regex_new (const gchar *pattern,
gint erroffset;
gboolean optimize = FALSE;
static gboolean initialized = FALSE;
+ unsigned long int pcre_compile_options;
g_return_val_if_fail (pattern != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
@@ -942,7 +943,8 @@ g_regex_new (const gchar *pattern,
/* For options set at the beginning of the pattern, pcre puts them into
* compile options, e.g. "(?i)foo" will make the pcre structure store
* PCRE_CASELESS even though it wasn't explicitly given for compilation. */
- pcre_fullinfo (re, NULL, PCRE_INFO_OPTIONS, &compile_options);
+ pcre_fullinfo (re, NULL, PCRE_INFO_OPTIONS, &pcre_compile_options);
+ compile_options = pcre_compile_options;
if (!(compile_options & G_REGEX_DUPNAMES))
{