Author: mbari
Date: Sun Feb 17 14:26:30 2008
New Revision: 6528
URL: http://svn.gnome.org/viewvc/glib?rev=6528&view=rev

Log:
2008-02-17  Marco Barisione  <[EMAIL PROTECTED]>

        * glib/gregex.c: (translate_compile_error), (g_regex_new): Avoid some
        useless casts from const gchar * to gchar *.  (#516597, patch by
        Yevgen Muntyan)


Modified:
   trunk/ChangeLog
   trunk/glib/gregex.c

Modified: trunk/glib/gregex.c
==============================================================================
--- trunk/glib/gregex.c (original)
+++ trunk/glib/gregex.c Sun Feb 17 14:26:30 2008
@@ -180,7 +180,7 @@
 }
 
 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
    * by PCRE.
@@ -1075,7 +1075,7 @@
 {
   GRegex *regex;
   pcre *re;
-  gchar *errmsg;
+  const gchar *errmsg;
   gint erroffset;
   gint errcode;
   gboolean optimize = FALSE;
@@ -1142,7 +1142,7 @@
 
   /* compile the pattern */
   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 
    * immediately */
@@ -1189,7 +1189,7 @@
 
   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)
         {
           GError *tmp_error = g_error_new (G_REGEX_ERROR,
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list

Want to limit the commits to a few modules? Go to above URL, log in to edit 
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development 
mailing list. Email [EMAIL PROTECTED] if interested.

Reply via email to