mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 03:32:12 +01:00
Avoid some useless casts from const gchar * to gchar *. (#516597, patch by
2008-02-17 Marco Barisione <marco@barisione.org> * glib/gregex.c: (translate_compile_error), (g_regex_new): Avoid some useless casts from const gchar * to gchar *. (#516597, patch by Yevgen Muntyan) svn path=/trunk/; revision=6528
This commit is contained in:
parent
7e0677b076
commit
a74c1a1a7c
@ -1,3 +1,9 @@
|
|||||||
|
2008-02-17 Marco Barisione <marco@barisione.org>
|
||||||
|
|
||||||
|
* glib/gregex.c: (translate_compile_error), (g_regex_new): Avoid some
|
||||||
|
useless casts from const gchar * to gchar *. (#516597, patch by
|
||||||
|
Yevgen Muntyan)
|
||||||
|
|
||||||
2008-02-17 Marco Barisione <marco@barisione.org>
|
2008-02-17 Marco Barisione <marco@barisione.org>
|
||||||
|
|
||||||
* glib/gregex.c: (match_info_new), (g_match_info_next): Don't return
|
* glib/gregex.c: (match_info_new), (g_match_info_next): Don't return
|
||||||
|
@ -180,7 +180,7 @@ match_error (gint errcode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
translate_compile_error (gint *errcode, gchar **errmsg)
|
translate_compile_error (gint *errcode, const gchar **errmsg)
|
||||||
{
|
{
|
||||||
/* Compile errors are created adding 100 to the error code returned
|
/* Compile errors are created adding 100 to the error code returned
|
||||||
* by PCRE.
|
* by PCRE.
|
||||||
@ -1075,7 +1075,7 @@ g_regex_new (const gchar *pattern,
|
|||||||
{
|
{
|
||||||
GRegex *regex;
|
GRegex *regex;
|
||||||
pcre *re;
|
pcre *re;
|
||||||
gchar *errmsg;
|
const gchar *errmsg;
|
||||||
gint erroffset;
|
gint erroffset;
|
||||||
gint errcode;
|
gint errcode;
|
||||||
gboolean optimize = FALSE;
|
gboolean optimize = FALSE;
|
||||||
@ -1142,7 +1142,7 @@ g_regex_new (const gchar *pattern,
|
|||||||
|
|
||||||
/* compile the pattern */
|
/* compile the pattern */
|
||||||
re = pcre_compile2 (pattern, compile_options, &errcode,
|
re = pcre_compile2 (pattern, compile_options, &errcode,
|
||||||
(const gchar **)&errmsg, &erroffset, NULL);
|
&errmsg, &erroffset, NULL);
|
||||||
|
|
||||||
/* if the compilation failed, set the error member and return
|
/* if the compilation failed, set the error member and return
|
||||||
* immediately */
|
* immediately */
|
||||||
@ -1189,7 +1189,7 @@ g_regex_new (const gchar *pattern,
|
|||||||
|
|
||||||
if (optimize)
|
if (optimize)
|
||||||
{
|
{
|
||||||
regex->extra = pcre_study (regex->pcre_re, 0, (const gchar **)&errmsg);
|
regex->extra = pcre_study (regex->pcre_re, 0, &errmsg);
|
||||||
if (errmsg != NULL)
|
if (errmsg != NULL)
|
||||||
{
|
{
|
||||||
GError *tmp_error = g_error_new (G_REGEX_ERROR,
|
GError *tmp_error = g_error_new (G_REGEX_ERROR,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user