glib r7051 - in trunk: . gio glib



Author: chpe
Date: Mon Jun 16 16:53:58 2008
New Revision: 7051
URL: http://svn.gnome.org/viewvc/glib?rev=7051&view=rev

Log:
Use g_set_error_literal where appropriate. Patch from bug #535947.


Modified:
   trunk/ChangeLog
   trunk/gio/ChangeLog
   trunk/gio/gappinfo.c
   trunk/gio/gbufferedinputstream.c
   trunk/gio/gcancellable.c
   trunk/gio/gdatainputstream.c
   trunk/gio/gdesktopappinfo.c
   trunk/gio/gfile.c
   trunk/gio/gfileenumerator.c
   trunk/gio/gfileinputstream.c
   trunk/gio/gfileoutputstream.c
   trunk/gio/ginputstream.c
   trunk/gio/glocaldirectorymonitor.c
   trunk/gio/glocalfile.c
   trunk/gio/glocalfileenumerator.c
   trunk/gio/glocalfileinfo.c
   trunk/gio/glocalfilemonitor.c
   trunk/gio/glocalfileoutputstream.c
   trunk/gio/gmemoryinputstream.c
   trunk/gio/gmemoryoutputstream.c
   trunk/gio/goutputstream.c
   trunk/gio/gwin32appinfo.c
   trunk/glib/gbookmarkfile.c
   trunk/glib/gconvert.c
   trunk/glib/gfileutils.c
   trunk/glib/giochannel.c
   trunk/glib/giounix.c
   trunk/glib/giowin32.c
   trunk/glib/gkeyfile.c
   trunk/glib/gregex.c
   trunk/glib/gshell.c
   trunk/glib/gspawn-win32.c
   trunk/glib/gutf8.c

Modified: trunk/gio/gappinfo.c
==============================================================================
--- trunk/gio/gappinfo.c	(original)
+++ trunk/gio/gappinfo.c	Mon Jun 16 16:53:58 2008
@@ -271,7 +271,8 @@
   if (iface->set_as_default_for_extension)
     return (* iface->set_as_default_for_extension) (appinfo, extension, error);
 
-  g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "g_app_info_set_as_default_for_extension not supported yet");
+  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                       "g_app_info_set_as_default_for_extension not supported yet");
   return FALSE;
 }
 
@@ -302,9 +303,9 @@
   if (iface->add_supports_type)
     return (* iface->add_supports_type) (appinfo, content_type, error);
 
-  g_set_error (error, G_IO_ERROR, 
-               G_IO_ERROR_NOT_SUPPORTED, 
-               "g_app_info_add_supports_type not supported yet");
+  g_set_error_literal (error, G_IO_ERROR, 
+                       G_IO_ERROR_NOT_SUPPORTED, 
+                       "g_app_info_add_supports_type not supported yet");
 
   return FALSE;
 }
@@ -360,9 +361,9 @@
   if (iface->remove_supports_type)
     return (* iface->remove_supports_type) (appinfo, content_type, error);
 
-  g_set_error (error, G_IO_ERROR, 
-               G_IO_ERROR_NOT_SUPPORTED, 
-               "g_app_info_remove_supports_type not supported yet");
+  g_set_error_literal (error, G_IO_ERROR, 
+                       G_IO_ERROR_NOT_SUPPORTED, 
+                       "g_app_info_remove_supports_type not supported yet");
 
   return FALSE;
 }

Modified: trunk/gio/gbufferedinputstream.c
==============================================================================
--- trunk/gio/gbufferedinputstream.c	(original)
+++ trunk/gio/gbufferedinputstream.c	Mon Jun 16 16:53:58 2008
@@ -865,8 +865,8 @@
 
   if (g_input_stream_is_closed (input_stream))
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_CLOSED,
-       _("Stream is already closed"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_CLOSED,
+                           _("Stream is already closed"));
       return -1;
     }
 

Modified: trunk/gio/gcancellable.c
==============================================================================
--- trunk/gio/gcancellable.c	(original)
+++ trunk/gio/gcancellable.c	Mon Jun 16 16:53:58 2008
@@ -289,10 +289,10 @@
 {
   if (g_cancellable_is_cancelled (cancellable))
     {
-      g_set_error (error,
-		   G_IO_ERROR,
-		   G_IO_ERROR_CANCELLED,
-		   _("Operation was cancelled"));
+      g_set_error_literal (error,
+                           G_IO_ERROR,
+                           G_IO_ERROR_CANCELLED,
+                           _("Operation was cancelled"));
       return TRUE;
     }
   

Modified: trunk/gio/gdatainputstream.c
==============================================================================
--- trunk/gio/gdatainputstream.c	(original)
+++ trunk/gio/gdatainputstream.c	Mon Jun 16 16:53:58 2008
@@ -305,8 +305,8 @@
 	return FALSE;
       if (res == 0)
 	{
-	  g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		       _("Unexpected early end-of-stream"));
+	  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+                               _("Unexpected early end-of-stream"));
 	  return FALSE;
 	}
     }

Modified: trunk/gio/gdesktopappinfo.c
==============================================================================
--- trunk/gio/gdesktopappinfo.c	(original)
+++ trunk/gio/gdesktopappinfo.c	Mon Jun 16 16:53:58 2008
@@ -584,8 +584,8 @@
   
   if (info->exec == NULL)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   _("Desktop file didn't specify Exec field"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+                           _("Desktop file didn't specify Exec field"));
       return FALSE;
     }
   
@@ -878,8 +878,8 @@
       
       if (info->terminal && !prepend_terminal_to_vector (&argc, &argv))
 	{
-	  g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		       _("Unable to find terminal required for application"));
+	  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+                               _("Unable to find terminal required for application"));
 	  goto out;
 	}
 

Modified: trunk/gio/gfile.c
==============================================================================
--- trunk/gio/gfile.c	(original)
+++ trunk/gio/gfile.c	Mon Jun 16 16:53:58 2008
@@ -806,9 +806,9 @@
 
   if (iface->enumerate_children == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return NULL;
     }
 
@@ -1034,9 +1034,9 @@
 
   if (iface->query_info == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return NULL;
     }
   
@@ -1167,9 +1167,9 @@
 
   if (iface->query_filesystem_info == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return NULL;
     }
   
@@ -1285,7 +1285,7 @@
   if (iface->find_enclosing_mount == NULL)
     {
 
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
 			/* Translators: This is an error message when trying to find the
 			 * enclosing (user visible) mount of a file, but none exists. */
 		   _("Containing mount does not exist"));
@@ -1398,9 +1398,9 @@
 
   if (iface->read_fn == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return NULL;
     }
   
@@ -1451,9 +1451,9 @@
 
   if (iface->append_to == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return NULL;
     }
   
@@ -1507,9 +1507,9 @@
 
   if (iface->create == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return NULL;
     }
   
@@ -1589,9 +1589,9 @@
 
   if (iface->replace == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return NULL;
     }
   
@@ -1929,8 +1929,8 @@
 	      
 	      if (file_type == G_FILE_TYPE_DIRECTORY)
 		{
-		  g_set_error (error, G_IO_ERROR, G_IO_ERROR_IS_DIRECTORY,
-			       _("Can't copy over directory"));
+		  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_IS_DIRECTORY,
+                                       _("Can't copy over directory"));
 		  return FALSE;
 		}
 	    }
@@ -1989,16 +1989,16 @@
 	    {
 	      if (file_type == G_FILE_TYPE_DIRECTORY)
 		{
-		  g_set_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_MERGE,
-			       _("Can't copy directory over directory"));
+		  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_MERGE,
+                                       _("Can't copy directory over directory"));
 		  return NULL;
 		}
 	      /* continue to would_recurse error */
 	    }
 	  else
 	    {
-	      g_set_error (error, G_IO_ERROR, G_IO_ERROR_EXISTS,
-			   _("Target file exists"));
+	      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_EXISTS,
+                                   _("Target file exists"));
 	      return NULL;
 	    }
 	}
@@ -2015,8 +2015,8 @@
 	  g_error_free (my_error);
 	}
       
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_RECURSE,
-		   _("Can't recursively copy directory"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_RECURSE,
+                           _("Can't recursively copy directory"));
       return NULL;
     }
 
@@ -2646,9 +2646,9 @@
   
   if (flags & G_FILE_COPY_NO_FALLBACK_FOR_MOVE)
     {  
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return FALSE;
     }
   
@@ -2697,9 +2697,9 @@
 
   if (iface->make_directory == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return FALSE;
     }
   
@@ -2815,9 +2815,9 @@
 
   if (*symlink_value == '\0')
     {
-      g_set_error (error, G_IO_ERROR,
-                   G_IO_ERROR_INVALID_ARGUMENT,
-                   _("Invalid symlink value given"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_INVALID_ARGUMENT,
+                           _("Invalid symlink value given"));
       return FALSE;
     }
   
@@ -2825,9 +2825,9 @@
 
   if (iface->make_symbolic_link == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return FALSE;
     }
   
@@ -2865,9 +2865,9 @@
 
   if (iface->delete_file == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return FALSE;
     }
   
@@ -2908,9 +2908,9 @@
 
   if (iface->trash == NULL)
     {
-      g_set_error (error,
-		   G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		   _("Trash not supported"));
+      g_set_error_literal (error,
+                           G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                           _("Trash not supported"));
       return FALSE;
     }
   
@@ -3189,9 +3189,9 @@
 
   if (iface->set_attribute == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return FALSE;
     }
 
@@ -3837,9 +3837,9 @@
 
   if (iface->monitor_dir == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Operation not supported"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Operation not supported"));
       return NULL;
     }
 
@@ -4999,9 +4999,9 @@
   if (appinfo != NULL)
     return appinfo;
 
-  g_set_error (error, G_IO_ERROR,
-	       G_IO_ERROR_NOT_SUPPORTED,
-	       _("No application is registered as handling this file"));
+  g_set_error_literal (error, G_IO_ERROR,
+                       G_IO_ERROR_NOT_SUPPORTED,
+                       _("No application is registered as handling this file"));
   return NULL;
   
 }

Modified: trunk/gio/gfileenumerator.c
==============================================================================
--- trunk/gio/gfileenumerator.c	(original)
+++ trunk/gio/gfileenumerator.c	Mon Jun 16 16:53:58 2008
@@ -198,15 +198,15 @@
   
   if (enumerator->priv->closed)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_CLOSED,
-		   _("Enumerator is closed"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_CLOSED,
+                           _("Enumerator is closed"));
       return NULL;
     }
 
   if (enumerator->priv->pending)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_PENDING,
-		   _("File enumerator has outstanding operation"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PENDING,
+                           _("File enumerator has outstanding operation"));
       return NULL;
     }
 
@@ -264,8 +264,8 @@
   
   if (enumerator->priv->pending)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_PENDING,
-		   _("File enumerator has outstanding operation"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PENDING,
+                           _("File enumerator has outstanding operation"));
       return FALSE;
     }
 

Modified: trunk/gio/gfileinputstream.c
==============================================================================
--- trunk/gio/gfileinputstream.c	(original)
+++ trunk/gio/gfileinputstream.c	Mon Jun 16 16:53:58 2008
@@ -150,8 +150,8 @@
   if (class->query_info)
     info = class->query_info (stream, attributes, cancellable, error);
   else
-    g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		 _("Stream doesn't support query_info"));
+    g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                         _("Stream doesn't support query_info"));
 
   if (cancellable)
     g_cancellable_pop_current (cancellable);
@@ -332,8 +332,8 @@
 
   if (!class->seek)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		   _("Seek not supported on stream"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                           _("Seek not supported on stream"));
       return FALSE;
     }
 
@@ -376,8 +376,8 @@
 				       GCancellable  *cancellable,
 				       GError       **error)
 {
-  g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-	       _("Truncate not allowed on input stream"));
+  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                       _("Truncate not allowed on input stream"));
   return FALSE;
 }
 
@@ -417,8 +417,8 @@
   if (class->query_info)
     info = class->query_info (G_FILE_INPUT_STREAM (object), data->attributes, cancellable, &error);
   else
-    g_set_error (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		 _("Stream doesn't support query_info"));
+    g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                         _("Stream doesn't support query_info"));
 
   if (info == NULL)
     {

Modified: trunk/gio/gfileoutputstream.c
==============================================================================
--- trunk/gio/gfileoutputstream.c	(original)
+++ trunk/gio/gfileoutputstream.c	Mon Jun 16 16:53:58 2008
@@ -164,8 +164,8 @@
   if (class->query_info)
     info = class->query_info (stream, attributes, cancellable, error);
   else
-    g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		 _("Stream doesn't support query_info"));
+    g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                         _("Stream doesn't support query_info"));
   
   if (cancellable)
     g_cancellable_pop_current (cancellable);
@@ -377,8 +377,8 @@
 
   if (!class->seek)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		   _("Seek not supported on stream"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                           _("Seek not supported on stream"));
       return FALSE;
     }
 
@@ -453,8 +453,8 @@
 
   if (!class->truncate_fn)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		   _("Truncate not supported on stream"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                           _("Truncate not supported on stream"));
       return FALSE;
     }
 
@@ -519,8 +519,8 @@
   if (class->query_info)
     info = class->query_info (G_FILE_OUTPUT_STREAM (object), data->attributes, cancellable, &error);
   else
-    g_set_error (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		 _("Stream doesn't support query_info"));
+    g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                         _("Stream doesn't support query_info"));
 
   if (info == NULL)
     {

Modified: trunk/gio/ginputstream.c
==============================================================================
--- trunk/gio/ginputstream.c	(original)
+++ trunk/gio/ginputstream.c	Mon Jun 16 16:53:58 2008
@@ -189,8 +189,8 @@
 
   if (class->read_fn == NULL) 
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		   _("Input stream doesn't implement read"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                           _("Input stream doesn't implement read"));
       return -1;
     }
 
@@ -888,14 +888,14 @@
   
   if (stream->priv->closed)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_CLOSED,
-		   _("Stream is already closed"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_CLOSED,
+                           _("Stream is already closed"));
       return FALSE;
     }
   
   if (stream->priv->pending)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_PENDING,
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PENDING,
 		/* Translators: This is an error you get if there is already an
 		 * operation running against this stream when you try to start
 		 * one */

Modified: trunk/gio/glocaldirectorymonitor.c
==============================================================================
--- trunk/gio/glocaldirectorymonitor.c	(original)
+++ trunk/gio/glocaldirectorymonitor.c	Mon Jun 16 16:53:58 2008
@@ -266,7 +266,8 @@
   if (type != G_TYPE_INVALID)
     monitor = G_FILE_MONITOR (g_object_new (type, "dirname", dirname, NULL));
   else
-    g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Unable to find default local directory monitor type"));
+    g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+                         _("Unable to find default local directory monitor type"));
 
   /* This is non-null on first pass here. Unref the class now.
    * This is to avoid unloading the module and then loading it

Modified: trunk/gio/glocalfile.c
==============================================================================
--- trunk/gio/glocalfile.c	(original)
+++ trunk/gio/glocalfile.c	Mon Jun 16 16:53:58 2008
@@ -1054,7 +1054,7 @@
 
   if (g_lstat (local->filename, &buf) != 0)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
 		      /* Translators: This is an error message when trying to
 		       * find the enclosing (user visible) mount of a file, but
 		       * none exists. */
@@ -1065,7 +1065,7 @@
   mountpoint = find_mountpoint_for (local->filename, buf.st_dev);
   if (mountpoint == NULL)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
 		      /* Translators: This is an error message when trying to
 		       * find the enclosing (user visible) mount of a file, but
 		       * none exists. */
@@ -1078,7 +1078,7 @@
   if (mount)
     return mount;
 
-  g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
+  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
 		  /* Translators: This is an error message when trying to find
 		   * the enclosing (user visible) mount of a file, but none
 		   * exists. */
@@ -1100,9 +1100,9 @@
   parent = g_file_get_parent (file);
   if (parent == NULL)
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_FAILED,
-		   _("Can't rename root directory"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_FAILED,
+                           _("Can't rename root directory"));
       return NULL;
     }
   
@@ -1118,9 +1118,9 @@
   if (!(g_lstat (new_local->filename, &statbuf) == -1 &&
 	errno == ENOENT))
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_EXISTS,
-		   _("Can't rename file, filename already exist"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_EXISTS,
+                           _("Can't rename file, filename already exist"));
       return NULL;
     }
 
@@ -1131,9 +1131,9 @@
       if (errsv == EINVAL)
 	/* We can't get a rename file into itself error herer,
 	   so this must be an invalid filename, on e.g. FAT */
-	g_set_error (error, G_IO_ERROR,
-		     G_IO_ERROR_INVALID_FILENAME,
-		     _("Invalid filename"));
+	g_set_error_literal (error, G_IO_ERROR,
+                             G_IO_ERROR_INVALID_FILENAME,
+                             _("Invalid filename"));
       else
 	g_set_error (error, G_IO_ERROR,
 		     g_io_error_from_errno (errsv),
@@ -1264,9 +1264,9 @@
   if (fstat(fd, &buf) == 0 && S_ISDIR (buf.st_mode))
     {
       close (fd);
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_IS_DIRECTORY,
-		   _("Can't open directory"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_IS_DIRECTORY,
+                           _("Can't open directory"));
       return NULL;
     }
   
@@ -1732,9 +1732,9 @@
       topdir = find_topdir_for (local->filename);
       if (topdir == NULL)
 	{
-	  g_set_error (error, G_IO_ERROR,
-		       G_IO_ERROR_NOT_SUPPORTED,
-		       _("Unable to find toplevel directory for trash"));
+	  g_set_error_literal (error, G_IO_ERROR,
+                               G_IO_ERROR_NOT_SUPPORTED,
+                               _("Unable to find toplevel directory for trash"));
 	  return FALSE;
 	}
       
@@ -1811,9 +1811,9 @@
       if (trashdir == NULL)
 	{
 	  g_free (topdir);
-	  g_set_error (error, G_IO_ERROR,
-		       G_IO_ERROR_NOT_SUPPORTED,
-		       _("Unable to find or create trash directory"));
+	  g_set_error_literal (error, G_IO_ERROR,
+                               G_IO_ERROR_NOT_SUPPORTED,
+                               _("Unable to find or create trash directory"));
 	  return FALSE;
 	}
     }
@@ -1831,9 +1831,9 @@
       g_free (topdir);
       g_free (infodir);
       g_free (filesdir);
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SUPPORTED,
-		   _("Unable to find or create trash directory"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SUPPORTED,
+                           _("Unable to find or create trash directory"));
       return FALSE;
     }  
 
@@ -1995,9 +1995,9 @@
 
       if (errsv == EINVAL)
 	/* This must be an invalid filename, on e.g. FAT */
-	g_set_error (error, G_IO_ERROR,
-		     G_IO_ERROR_INVALID_FILENAME,
-		     _("Invalid filename"));
+	g_set_error_literal (error, G_IO_ERROR,
+                             G_IO_ERROR_INVALID_FILENAME,
+                             _("Invalid filename"));
       else
 	g_set_error (error, G_IO_ERROR,
 		     g_io_error_from_errno (errsv),
@@ -2024,9 +2024,9 @@
 
       if (errsv == EINVAL)
 	/* This must be an invalid filename, on e.g. FAT */
-	g_set_error (error, G_IO_ERROR,
-		     G_IO_ERROR_INVALID_FILENAME,
-		     _("Invalid filename"));
+	g_set_error_literal (error, G_IO_ERROR,
+                             G_IO_ERROR_INVALID_FILENAME,
+                             _("Invalid filename"));
       else
 	g_set_error (error, G_IO_ERROR,
 		     g_io_error_from_errno (errsv),
@@ -2036,7 +2036,7 @@
     }
   return TRUE;
 #else
-  g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Symlinks not supported");
+  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Symlinks not supported");
   return FALSE;
 #endif
 }
@@ -2052,7 +2052,7 @@
 		   GError                **error)
 {
   /* Fall back to default copy */
-  g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Copy not supported");
+  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Copy not supported");
   return FALSE;
 }
 
@@ -2076,7 +2076,7 @@
       !G_IS_LOCAL_FILE (destination))
     {
       /* Fall back to default move */
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Move not supported");
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Move not supported");
       return FALSE;
     }
   
@@ -2110,24 +2110,24 @@
 	  if (S_ISDIR (statbuf.st_mode))
 	    {
 	      if (source_is_dir)
-		g_set_error (error,
-			     G_IO_ERROR,
-			     G_IO_ERROR_WOULD_MERGE,
-			     _("Can't move directory over directory"));
+		g_set_error_literal (error,
+                                     G_IO_ERROR,
+                                     G_IO_ERROR_WOULD_MERGE,
+                                     _("Can't move directory over directory"));
               else
-		g_set_error (error,
-			     G_IO_ERROR,
-			     G_IO_ERROR_IS_DIRECTORY,
-			     _("Can't copy over directory"));
+		g_set_error_literal (error,
+                                     G_IO_ERROR,
+                                     G_IO_ERROR_IS_DIRECTORY,
+                                     _("Can't copy over directory"));
 	      return FALSE;
 	    }
 	}
       else
 	{
-	  g_set_error (error,
-		       G_IO_ERROR,
-		       G_IO_ERROR_EXISTS,
-		       _("Target file exists"));
+	  g_set_error_literal (error,
+                               G_IO_ERROR,
+                               G_IO_ERROR_EXISTS,
+                               _("Target file exists"));
 	  return FALSE;
 	}
     }
@@ -2137,10 +2137,10 @@
       backup_name = g_strconcat (local_destination->filename, "~", NULL);
       if (g_rename (local_destination->filename, backup_name) == -1)
 	{
-      	  g_set_error (error,
-		       G_IO_ERROR,
-		       G_IO_ERROR_CANT_CREATE_BACKUP,
-		       _("Backup file creation failed"));
+      	  g_set_error_literal (error,
+                               G_IO_ERROR,
+                               G_IO_ERROR_CANT_CREATE_BACKUP,
+                               _("Backup file creation failed"));
 	  g_free (backup_name);
 	  return FALSE;
 	}
@@ -2171,16 +2171,16 @@
 
       if (errsv == EXDEV)
 	/* This will cause the fallback code to run */
-	g_set_error (error, G_IO_ERROR,
-		     G_IO_ERROR_NOT_SUPPORTED,
-		     _("Move between mounts not supported"));
+	g_set_error_literal (error, G_IO_ERROR,
+                             G_IO_ERROR_NOT_SUPPORTED,
+                             _("Move between mounts not supported"));
       else if (errsv == EINVAL)
 	/* This must be an invalid filename, on e.g. FAT, or
 	   we're trying to move the file into itself...
 	   We return invalid filename for both... */
-	g_set_error (error, G_IO_ERROR,
-		     G_IO_ERROR_INVALID_FILENAME,
-		     _("Invalid filename"));
+	g_set_error_literal (error, G_IO_ERROR,
+                             G_IO_ERROR_INVALID_FILENAME,
+                             _("Invalid filename"));
       else
 	g_set_error (error, G_IO_ERROR,
 		     g_io_error_from_errno (errsv),

Modified: trunk/gio/glocalfileenumerator.c
==============================================================================
--- trunk/gio/glocalfileenumerator.c	(original)
+++ trunk/gio/glocalfileenumerator.c	Mon Jun 16 16:53:58 2008
@@ -180,9 +180,9 @@
         }
     }
   
-  g_set_error (error, G_IO_ERROR,
-	       new_code,
-	       "%s", file_error->message);
+  g_set_error_literal (error, G_IO_ERROR,
+                       new_code,
+                       file_error->message);
 }
 #endif
 
@@ -223,9 +223,9 @@
     {
       errsv = errno;
 
-      g_set_error (error, G_IO_ERROR,
-		   g_io_error_from_errno (errsv),
-		   "%s", g_strerror (errsv));
+      g_set_error_literal (error, G_IO_ERROR,
+                           g_io_error_from_errno (errsv),
+                           g_strerror (errsv));
       g_free (filename);
       return NULL;
     }

Modified: trunk/gio/glocalfileinfo.c
==============================================================================
--- trunk/gio/glocalfileinfo.c	(original)
+++ trunk/gio/glocalfileinfo.c	Mon Jun 16 16:53:58 2008
@@ -712,22 +712,22 @@
 
   if (attr_value == NULL)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-                   _("Attribute value must be non-NULL"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+                           _("Attribute value must be non-NULL"));
       return FALSE;
     }
 
   if (attr_value->type != G_FILE_ATTRIBUTE_TYPE_STRING)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-                   _("Invalid attribute type (string expected)"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+                           _("Invalid attribute type (string expected)"));
       return FALSE;
     }
 
   if (!name_is_valid (escaped_attribute))
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-		   _("Invalid extended attribute name"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+                           _("Invalid extended attribute name"));
       return FALSE;
     }
 
@@ -1739,8 +1739,8 @@
 {
   if (value->type != G_FILE_ATTRIBUTE_TYPE_UINT32)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-		   _("Invalid attribute type (uint32 expected)"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+                           _("Invalid attribute type (uint32 expected)"));
       return FALSE;
     }
 
@@ -1757,8 +1757,8 @@
 {
   if (value->type != G_FILE_ATTRIBUTE_TYPE_UINT64)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-		   _("Invalid attribute type (uint64 expected)"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+                           _("Invalid attribute type (uint64 expected)"));
       return FALSE;
     }
 
@@ -1776,8 +1776,8 @@
 {
   if (value->type != G_FILE_ATTRIBUTE_TYPE_BYTE_STRING)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-		   _("Invalid attribute type (byte string expected)"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+                           _("Invalid attribute type (byte string expected)"));
       return FALSE;
     }
 
@@ -1876,8 +1876,8 @@
   
   if (val == NULL)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-		   _("symlink must be non-NULL"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+                           _("symlink must be non-NULL"));
       return FALSE;
     }
   
@@ -1894,9 +1894,9 @@
   
   if (!S_ISLNK (statbuf.st_mode))
     {
-      g_set_error (error, G_IO_ERROR,
-		   G_IO_ERROR_NOT_SYMBOLIC_LINK,
-		   _("Error setting symlink: file is not a symlink"));
+      g_set_error_literal (error, G_IO_ERROR,
+                           G_IO_ERROR_NOT_SYMBOLIC_LINK,
+                           _("Error setting symlink: file is not a symlink"));
       return FALSE;
     }
   

Modified: trunk/gio/glocalfilemonitor.c
==============================================================================
--- trunk/gio/glocalfilemonitor.c	(original)
+++ trunk/gio/glocalfilemonitor.c	Mon Jun 16 16:53:58 2008
@@ -193,7 +193,8 @@
   if (type != G_TYPE_INVALID)
     monitor = G_FILE_MONITOR (g_object_new (type, "filename", pathname, NULL));
   else
-    g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Unable to find default local file monitor type"));
+    g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+                         _("Unable to find default local file monitor type"));
 
   /* This is non-null on first pass here. Unref the class now.
    * This is to avoid unloading the module and then loading it

Modified: trunk/gio/glocalfileoutputstream.c
==============================================================================
--- trunk/gio/glocalfileoutputstream.c	(original)
+++ trunk/gio/glocalfileoutputstream.c	Mon Jun 16 16:53:58 2008
@@ -466,9 +466,9 @@
 
       if (errsv == EINVAL)
 	/* This must be an invalid filename, on e.g. FAT */
-	g_set_error (error, G_IO_ERROR,
-		     G_IO_ERROR_INVALID_FILENAME,
-		     _("Invalid filename"));
+	g_set_error_literal (error, G_IO_ERROR,
+                             G_IO_ERROR_INVALID_FILENAME,
+                             _("Invalid filename"));
       else
 	{
 	  char *display_name = g_filename_display_name (filename);
@@ -511,9 +511,9 @@
 
       if (errsv == EINVAL)
 	/* This must be an invalid filename, on e.g. FAT */
-	g_set_error (error, G_IO_ERROR,
-		     G_IO_ERROR_INVALID_FILENAME,
-		     _("Invalid filename"));
+	g_set_error_literal (error, G_IO_ERROR,
+                             G_IO_ERROR_INVALID_FILENAME,
+                             _("Invalid filename"));
       else
 	{
 	  char *display_name = g_filename_display_name (filename);
@@ -672,15 +672,15 @@
   if (!S_ISREG (original_stat.st_mode))
     {
       if (S_ISDIR (original_stat.st_mode))
-	g_set_error (error,
-		     G_IO_ERROR,
-		     G_IO_ERROR_IS_DIRECTORY,
-		     _("Target file is a directory"));
+	g_set_error_literal (error,
+                             G_IO_ERROR,
+                             G_IO_ERROR_IS_DIRECTORY,
+                             _("Target file is a directory"));
       else
-	g_set_error (error,
-		     G_IO_ERROR,
-		     G_IO_ERROR_NOT_REGULAR_FILE,
-		     _("Target file is not a regular file"));
+	g_set_error_literal (error,
+                             G_IO_ERROR,
+                             G_IO_ERROR_NOT_REGULAR_FILE,
+                             _("Target file is not a regular file"));
       goto err_out;
     }
   
@@ -689,10 +689,10 @@
       current_etag = _g_local_file_info_create_etag (&original_stat);
       if (strcmp (etag, current_etag) != 0)
 	{
-	  g_set_error (error,
-		       G_IO_ERROR,
-		       G_IO_ERROR_WRONG_ETAG,
-		       _("The file was externally modified"));
+	  g_set_error_literal (error,
+                               G_IO_ERROR,
+                               G_IO_ERROR_WRONG_ETAG,
+                               _("The file was externally modified"));
 	  g_free (current_etag);
 	  goto err_out;
 	}
@@ -770,10 +770,10 @@
 
       if (g_unlink (backup_filename) == -1 && errno != ENOENT)
 	{
-	  g_set_error (error,
-		       G_IO_ERROR,
-		       G_IO_ERROR_CANT_CREATE_BACKUP,
-		       _("Backup file creation failed"));
+	  g_set_error_literal (error,
+                               G_IO_ERROR,
+                               G_IO_ERROR_CANT_CREATE_BACKUP,
+                               _("Backup file creation failed"));
 	  g_free (backup_filename);
 	  goto err_out;
 	}
@@ -784,10 +784,10 @@
 
       if (bfd == -1)
 	{
-	  g_set_error (error,
-		       G_IO_ERROR,
-		       G_IO_ERROR_CANT_CREATE_BACKUP,
-		       _("Backup file creation failed"));
+	  g_set_error_literal (error,
+                               G_IO_ERROR,
+                               G_IO_ERROR_CANT_CREATE_BACKUP,
+                               _("Backup file creation failed"));
 	  g_free (backup_filename);
 	  goto err_out;
 	}
@@ -799,10 +799,10 @@
 #if defined(HAVE_FCHOWN) && defined(HAVE_FCHMOD)
       if (fstat (bfd, &tmp_statbuf) != 0)
 	{
-	  g_set_error (error,
-		       G_IO_ERROR,
-		       G_IO_ERROR_CANT_CREATE_BACKUP,
-		       _("Backup file creation failed"));
+	  g_set_error_literal (error,
+                               G_IO_ERROR,
+                               G_IO_ERROR_CANT_CREATE_BACKUP,
+                               _("Backup file creation failed"));
 	  g_unlink (backup_filename);
 	  g_free (backup_filename);
 	  goto err_out;
@@ -815,10 +815,10 @@
 		      (original_stat.st_mode & 0707) |
 		      ((original_stat.st_mode & 07) << 3)) != 0)
 	    {
-	      g_set_error (error,
-			   G_IO_ERROR,
-			   G_IO_ERROR_CANT_CREATE_BACKUP,
-			   _("Backup file creation failed"));
+	      g_set_error_literal (error,
+                                   G_IO_ERROR,
+                                   G_IO_ERROR_CANT_CREATE_BACKUP,
+                                   _("Backup file creation failed"));
 	      g_unlink (backup_filename);
 	      close (bfd);
 	      g_free (backup_filename);
@@ -829,10 +829,10 @@
 
       if (!copy_file_data (fd, bfd, NULL))
 	{
-	  g_set_error (error,
-		       G_IO_ERROR,
-		       G_IO_ERROR_CANT_CREATE_BACKUP,
-		       _("Backup file creation failed"));
+	  g_set_error_literal (error,
+                               G_IO_ERROR,
+                               G_IO_ERROR_CANT_CREATE_BACKUP,
+                               _("Backup file creation failed"));
 	  g_unlink (backup_filename);
 	  close (bfd);
 	  g_free (backup_filename);
@@ -919,9 +919,9 @@
 
       if (errsv == EINVAL)
 	/* This must be an invalid filename, on e.g. FAT */
-	g_set_error (error, G_IO_ERROR,
-		     G_IO_ERROR_INVALID_FILENAME,
-		     _("Invalid filename"));
+	g_set_error_literal (error, G_IO_ERROR,
+                             G_IO_ERROR_INVALID_FILENAME,
+                             _("Invalid filename"));
       else
 	{
 	  char *display_name = g_filename_display_name (filename);

Modified: trunk/gio/gmemoryinputstream.c
==============================================================================
--- trunk/gio/gmemoryinputstream.c	(original)
+++ trunk/gio/gmemoryinputstream.c	Mon Jun 16 16:53:58 2008
@@ -480,20 +480,20 @@
       break;
   
     default:
-      g_set_error (error,
-                   G_IO_ERROR,
-                   G_IO_ERROR_INVALID_ARGUMENT,
-                   _("Invalid GSeekType supplied"));
+      g_set_error_literal (error,
+                           G_IO_ERROR,
+                           G_IO_ERROR_INVALID_ARGUMENT,
+                           _("Invalid GSeekType supplied"));
 
       return FALSE;
     }
 
   if (absolute < 0 || absolute > priv->len)
     {
-      g_set_error (error,
-                   G_IO_ERROR,
-                   G_IO_ERROR_INVALID_ARGUMENT,
-                   _("Invalid seek request"));
+      g_set_error_literal (error,
+                           G_IO_ERROR,
+                           G_IO_ERROR_INVALID_ARGUMENT,
+                           _("Invalid seek request"));
       return FALSE;
     }
 
@@ -514,10 +514,10 @@
                                 GCancellable  *cancellable,
                                 GError       **error)
 {
-  g_set_error (error,
-               G_IO_ERROR,
-               G_IO_ERROR_NOT_SUPPORTED,
-               _("Cannot truncate GMemoryInputStream"));
+  g_set_error_literal (error,
+                       G_IO_ERROR,
+                       G_IO_ERROR_NOT_SUPPORTED,
+                       _("Cannot truncate GMemoryInputStream"));
   return FALSE;
 }
 

Modified: trunk/gio/gmemoryoutputstream.c
==============================================================================
--- trunk/gio/gmemoryoutputstream.c	(original)
+++ trunk/gio/gmemoryoutputstream.c	Mon Jun 16 16:53:58 2008
@@ -281,10 +281,10 @@
 {
   if (size > G_MAXUINT)
     {
-      g_set_error (error,
-                   G_IO_ERROR,
-                   G_IO_ERROR_FAILED,
-                   _("Reached maximum data array limit"));
+      g_set_error_literal (error,
+                           G_IO_ERROR,
+                           G_IO_ERROR_FAILED,
+                           _("Reached maximum data array limit"));
 
       return FALSE;
     }
@@ -316,10 +316,10 @@
 	  priv->pos < priv->len)
 	return TRUE; /* Short write */
       
-      g_set_error (error,
-                   G_IO_ERROR,
-                   G_IO_ERROR_NO_SPACE,
-                   _("Memory output stream not resizable"));
+      g_set_error_literal (error,
+                           G_IO_ERROR,
+                           G_IO_ERROR_NO_SPACE,
+                           _("Memory output stream not resizable"));
       return FALSE;
     }
 
@@ -332,10 +332,10 @@
 	  priv->pos < priv->len)
 	return TRUE; /* Short write */
       
-      g_set_error (error,
-                   G_IO_ERROR,
-                   G_IO_ERROR_NO_SPACE,
-                   _("Failed to resize memory output stream"));
+      g_set_error_literal (error,
+                           G_IO_ERROR,
+                           G_IO_ERROR_NO_SPACE,
+                           _("Failed to resize memory output stream"));
       return FALSE;
     }
 
@@ -538,20 +538,20 @@
       break;
   
     default:
-      g_set_error (error,
-                   G_IO_ERROR,
-                   G_IO_ERROR_INVALID_ARGUMENT,
-                   _("Invalid GSeekType supplied"));
+      g_set_error_literal (error,
+                           G_IO_ERROR,
+                           G_IO_ERROR_INVALID_ARGUMENT,
+                           _("Invalid GSeekType supplied"));
 
       return FALSE;
     }
 
   if (absolute < 0) 
     {
-      g_set_error (error,
-                   G_IO_ERROR,
-                   G_IO_ERROR_INVALID_ARGUMENT,
-                   _("Invalid seek request"));
+      g_set_error_literal (error,
+                           G_IO_ERROR,
+                           G_IO_ERROR_INVALID_ARGUMENT,
+                           _("Invalid seek request"));
       return FALSE;
     }
 

Modified: trunk/gio/goutputstream.c
==============================================================================
--- trunk/gio/goutputstream.c	(original)
+++ trunk/gio/goutputstream.c	Mon Jun 16 16:53:58 2008
@@ -196,8 +196,8 @@
 
   if (class->write_fn == NULL) 
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		   _("Output stream doesn't implement write"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                           _("Output stream doesn't implement write"));
       return -1;
     }
   
@@ -357,8 +357,8 @@
 
   if (g_input_stream_is_closed (source))
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_CLOSED,
-		   _("Source stream is already closed"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_CLOSED,
+                           _("Source stream is already closed"));
       return -1;
     }
 
@@ -397,8 +397,8 @@
   bytes_copied = 0;
   if (class->write_fn == NULL) 
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		   _("Output stream doesn't implement write"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                           _("Output stream doesn't implement write"));
       res = FALSE;
       goto notsupported;
     }
@@ -1070,18 +1070,18 @@
   
   if (stream->priv->closed)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_CLOSED,
-		   _("Stream is already closed"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_CLOSED,
+                           _("Stream is already closed"));
       return FALSE;
     }
   
   if (stream->priv->pending)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_PENDING,
-		      /* Translators: This is an error you get if there is
-		       * already an operation running against this stream when
-		       * you try to start one */
-		      _("Stream has outstanding operation"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PENDING,
+                           /* Translators: This is an error you get if there is
+                            * already an operation running against this stream when
+                            * you try to start one */
+                           _("Stream has outstanding operation"));
       return FALSE;
     }
   

Modified: trunk/gio/gwin32appinfo.c
==============================================================================
--- trunk/gio/gwin32appinfo.c	(original)
+++ trunk/gio/gwin32appinfo.c	Mon Jun 16 16:53:58 2008
@@ -273,7 +273,7 @@
 		      NULL,
 		      &class_key) != S_OK)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Can't find application"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Can't find application"));
       return FALSE;
     }
 #endif
@@ -343,9 +343,9 @@
 			      GAppLaunchContext  *launch_context,
 			      GError            **error)
 {
-  g_set_error (error, G_IO_ERROR, 
-               G_IO_ERROR_NOT_SUPPORTED, 
-               _("URIs not supported"));
+  g_set_error_literal (error, G_IO_ERROR, 
+                       G_IO_ERROR_NOT_SUPPORTED, 
+                       _("URIs not supported"));
   return FALSE;
 }
 
@@ -365,9 +365,9 @@
                                           const char  *content_type,
                                           GError     **error)
 {
-  g_set_error (error, G_IO_ERROR, 
-               G_IO_ERROR_NOT_SUPPORTED, 
-               _("association changes not supported on win32"));
+  g_set_error_literal (error, G_IO_ERROR, 
+                       G_IO_ERROR_NOT_SUPPORTED, 
+                       _("association changes not supported on win32"));
   return FALSE;
 }
 
@@ -377,9 +377,9 @@
 				    GAppInfoCreateFlags   flags,
 				    GError              **error)
 {
-  g_set_error (error, G_IO_ERROR, 
-               G_IO_ERROR_NOT_SUPPORTED, 
-               _("Association creation not supported on win32"));
+  g_set_error_literal (error, G_IO_ERROR, 
+                       G_IO_ERROR_NOT_SUPPORTED, 
+                       _("Association creation not supported on win32"));
   return NULL;
 }
 

Modified: trunk/glib/gbookmarkfile.c
==============================================================================
--- trunk/glib/gbookmarkfile.c	(original)
+++ trunk/glib/gbookmarkfile.c	Mon Jun 16 16:53:58 2008
@@ -1793,9 +1793,9 @@
 
   if (!path)
     {
-      g_set_error (error, G_BOOKMARK_FILE_ERROR,
-                   G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND,
-                   _("No valid bookmark file found in data dirs"));
+      g_set_error_literal (error, G_BOOKMARK_FILE_ERROR,
+                           G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND,
+                           _("No valid bookmark file found in data dirs"));
       
       return NULL;
     }

Modified: trunk/glib/gconvert.c
==============================================================================
--- trunk/glib/gconvert.c	(original)
+++ trunk/glib/gconvert.c	Mon Jun 16 16:53:58 2008
@@ -628,8 +628,8 @@
 	      break;
 	    case EILSEQ:
 	      if (error)
-		g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-			     _("Invalid byte sequence in conversion input"));
+		g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                                     _("Invalid byte sequence in conversion input"));
 	      have_error = TRUE;
 	      break;
 	    default:
@@ -665,8 +665,8 @@
           if (!have_error)
             {
 	      if (error)
-		g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
-			     _("Partial character sequence at end of input"));
+		g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
+                                     _("Partial character sequence at end of input"));
               have_error = TRUE;
             }
 	}
@@ -1013,8 +1013,8 @@
       if (bytes_written)
 	*bytes_written = 0;
 
-      g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-		   _("Invalid byte sequence in conversion input"));
+      g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                           _("Invalid byte sequence in conversion input"));
       return NULL;
     }
   
@@ -1890,8 +1890,8 @@
       !(g_utf8_validate (hostname, -1, NULL)
 	&& hostname_validate (hostname)))
     {
-      g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-		   _("Invalid hostname"));
+      g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                           _("Invalid hostname"));
       return NULL;
     }
   

Modified: trunk/glib/gfileutils.c
==============================================================================
--- trunk/glib/gfileutils.c	(original)
+++ trunk/glib/gfileutils.c	Mon Jun 16 16:53:58 2008
@@ -1902,10 +1902,10 @@
       buffer = g_realloc (buffer, size);
     }
 #else
-  g_set_error (error,
-	       G_FILE_ERROR,
-	       G_FILE_ERROR_INVAL,
-	       _("Symbolic links not supported"));
+  g_set_error_literal (error,
+                       G_FILE_ERROR,
+                       G_FILE_ERROR_INVAL,
+                       _("Symbolic links not supported"));
 	
   return NULL;
 #endif

Modified: trunk/glib/giochannel.c
==============================================================================
--- trunk/glib/giochannel.c	(original)
+++ trunk/glib/giochannel.c	Mon Jun 16 16:53:58 2008
@@ -1325,7 +1325,7 @@
                   status = G_IO_STATUS_NORMAL;
                 else
                   {
-                    g_set_error (err, G_CONVERT_ERROR,
+                    g_set_error_literal (err, G_CONVERT_ERROR,
                       G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
                       _("Invalid byte sequence in conversion input"));
                     return G_IO_STATUS_ERROR;
@@ -1367,7 +1367,7 @@
                   status = G_IO_STATUS_NORMAL;
                 else
                   {
-                    g_set_error (err, G_CONVERT_ERROR,
+                    g_set_error_literal (err, G_CONVERT_ERROR,
                       G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
                       _("Invalid byte sequence in conversion input"));
                     status = G_IO_STATUS_ERROR;
@@ -1503,8 +1503,8 @@
   if (!channel->use_buffer)
     {
       /* Can't do a raw read in read_line */
-      g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
-                   _("Can't do a raw read in g_io_channel_read_line_string"));
+      g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
+                           _("Can't do a raw read in g_io_channel_read_line_string"));
       return G_IO_STATUS_ERROR;
     }
 
@@ -1549,9 +1549,10 @@
 
                     if (channel->encoding && channel->read_buf->len != 0)
                       {
-                        g_set_error (error, G_CONVERT_ERROR,
-                                     G_CONVERT_ERROR_PARTIAL_INPUT,
-                                     _("Leftover unconverted data in read buffer"));
+                        g_set_error_literal (error, G_CONVERT_ERROR,
+                                             G_CONVERT_ERROR_PARTIAL_INPUT,
+                                             _("Leftover unconverted data in "
+                                               "read buffer"));
                         return G_IO_STATUS_ERROR;
                       }
                     else
@@ -1630,8 +1631,8 @@
         {
           if (channel->encoding && channel->read_buf->len > 0)
             {
-              g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
-                           _("Channel terminates in a partial character"));
+              g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
+                                   _("Channel terminates in a partial character"));
               return G_IO_STATUS_ERROR;
             }
           line_length = use_buf->len;
@@ -1693,8 +1694,8 @@
 
   if (!channel->use_buffer)
     {
-      g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
-                   _("Can't do a raw read in g_io_channel_read_to_end"));
+      g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
+                           _("Can't do a raw read in g_io_channel_read_to_end"));
       return G_IO_STATUS_ERROR;
     }
 
@@ -1707,8 +1708,8 @@
 
   if (channel->encoding && channel->read_buf->len > 0)
     {
-      g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
-                   _("Channel terminates in a partial character"));
+      g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
+                           _("Channel terminates in a partial character"));
       return G_IO_STATUS_ERROR;
     }
 
@@ -1806,9 +1807,9 @@
       if (status == G_IO_STATUS_EOF && channel->encoding
           && BUF_LEN (channel->read_buf) > 0)
         {
-          g_set_error (error, G_CONVERT_ERROR,
-                       G_CONVERT_ERROR_PARTIAL_INPUT,
-                       _("Leftover unconverted data in read buffer"));
+          g_set_error_literal (error, G_CONVERT_ERROR,
+                               G_CONVERT_ERROR_PARTIAL_INPUT,
+                               _("Leftover unconverted data in read buffer"));
           status = G_IO_STATUS_ERROR;
         }
 
@@ -1893,9 +1894,9 @@
 
       if (status == G_IO_STATUS_EOF && BUF_LEN (channel->read_buf) > 0)
         {
-          g_set_error (error, G_CONVERT_ERROR,
-                       G_CONVERT_ERROR_PARTIAL_INPUT,
-                       _("Leftover unconverted data in read buffer"));
+          g_set_error_literal (error, G_CONVERT_ERROR,
+                               G_CONVERT_ERROR_PARTIAL_INPUT,
+                               _("Leftover unconverted data in read buffer"));
           status = G_IO_STATUS_ERROR;
         }
 
@@ -2210,7 +2211,7 @@
                       }
                     break;
                   case EILSEQ:
-                    g_set_error (error, G_CONVERT_ERROR,
+                    g_set_error_literal (error, G_CONVERT_ERROR,
                       G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
                       _("Invalid byte sequence in conversion input"));
                     if (from_buf_old_len > 0 && from_buf_len == left_len)

Modified: trunk/glib/giounix.c
==============================================================================
--- trunk/glib/giounix.c	(original)
+++ trunk/glib/giounix.c	Mon Jun 16 16:53:58 2008
@@ -203,9 +203,9 @@
             return G_IO_STATUS_AGAIN;
 #endif
           default:
-            g_set_error (err, G_IO_CHANNEL_ERROR,
-                         g_io_channel_error_from_errno (errno),
-                         g_strerror (errno));
+            g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                                 g_io_channel_error_from_errno (errno),
+                                 g_strerror (errno));
             return G_IO_STATUS_ERROR;
         }
     }
@@ -243,9 +243,9 @@
             return G_IO_STATUS_AGAIN;
 #endif
           default:
-            g_set_error (err, G_IO_CHANNEL_ERROR,
-                         g_io_channel_error_from_errno (errno),
-                         g_strerror (errno));
+            g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                                 g_io_channel_error_from_errno (errno),
+                                 g_strerror (errno));
             return G_IO_STATUS_ERROR;
         }
     }
@@ -285,9 +285,9 @@
   tmp_offset = offset;
   if (tmp_offset != offset)
     {
-      g_set_error (err, G_IO_CHANNEL_ERROR,
-		   g_io_channel_error_from_errno (EINVAL),
-		   g_strerror (EINVAL));
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                           g_io_channel_error_from_errno (EINVAL),
+                           g_strerror (EINVAL));
       return G_IO_STATUS_ERROR;
     }
   
@@ -295,9 +295,9 @@
 
   if (result < 0)
     {
-      g_set_error (err, G_IO_CHANNEL_ERROR,
-		   g_io_channel_error_from_errno (errno),
-		   g_strerror (errno));
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                           g_io_channel_error_from_errno (errno),
+                           g_strerror (errno));
       return G_IO_STATUS_ERROR;
     }
 
@@ -313,9 +313,9 @@
 
   if (close (unix_channel->fd) < 0)
     {
-      g_set_error (err, G_IO_CHANNEL_ERROR,
-		   g_io_channel_error_from_errno (errno),
-		   g_strerror (errno));
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                           g_io_channel_error_from_errno (errno),
+                           g_strerror (errno));
       return G_IO_STATUS_ERROR;
     }
 
@@ -376,9 +376,9 @@
 
   if (fcntl (unix_channel->fd, F_SETFL, fcntl_flags) == -1)
     {
-      g_set_error (err, G_IO_CHANNEL_ERROR,
-		   g_io_channel_error_from_errno (errno),
-		   g_strerror (errno));
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                           g_io_channel_error_from_errno (errno),
+                           g_strerror (errno));
       return G_IO_STATUS_ERROR;
     }
 
@@ -512,18 +512,18 @@
   fid = open (filename, flags, create_mode);
   if (fid == -1)
     {
-      g_set_error (error, G_FILE_ERROR,
-                   g_file_error_from_errno (errno),
-                   g_strerror (errno));
+      g_set_error_literal (error, G_FILE_ERROR,
+                           g_file_error_from_errno (errno),
+                           g_strerror (errno));
       return (GIOChannel *)NULL;
     }
 
   if (fstat (fid, &buffer) == -1) /* In case someone opens a FIFO */
     {
       close (fid);
-      g_set_error (error, G_FILE_ERROR,
-                   g_file_error_from_errno (errno),
-                   g_strerror (errno));
+      g_set_error_literal (error, G_FILE_ERROR,
+                           g_file_error_from_errno (errno),
+                           g_strerror (errno));
       return (GIOChannel *)NULL;
     }
 

Modified: trunk/glib/giowin32.c
==============================================================================
--- trunk/glib/giowin32.c	(original)
+++ trunk/glib/giowin32.c	Mon Jun 16 16:53:58 2008
@@ -975,8 +975,8 @@
   
   if (count < sizeof (MSG))
     {
-      g_set_error (err, G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_INVAL,
-		   "Incorrect message size"); /* Informative enough error message? */
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_INVAL,
+                           "Incorrect message size"); /* Informative enough error message? */
       return G_IO_STATUS_ERROR;
     }
   
@@ -1004,8 +1004,8 @@
   
   if (count != sizeof (MSG))
     {
-      g_set_error (err, G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_INVAL,
-		   "Incorrect message size"); /* Informative enough error message? */
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_INVAL,
+                           "Incorrect message size"); /* Informative enough error message? */
       return G_IO_STATUS_ERROR;
     }
   
@@ -1014,7 +1014,7 @@
   if (!PostMessage (win32_channel->hwnd, msg.message, msg.wParam, msg.lParam))
     {
       gchar *emsg = g_win32_error_message (GetLastError ());
-      g_set_error (err, G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, emsg);
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, emsg);
       g_free (emsg);
       return G_IO_STATUS_ERROR;
     }
@@ -1111,9 +1111,9 @@
 	  return G_IO_STATUS_AGAIN;
 #endif
 	default:
-	  g_set_error (err, G_IO_CHANNEL_ERROR,
-		       g_io_channel_error_from_errno (errno),
-		       g_strerror (errno));
+	  g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                               g_io_channel_error_from_errno (errno),
+                               g_strerror (errno));
 	  return G_IO_STATUS_ERROR;
         }
     }
@@ -1154,9 +1154,9 @@
 	  return G_IO_STATUS_AGAIN;
 #endif
 	default:
-	  g_set_error (err, G_IO_CHANNEL_ERROR,
-		       g_io_channel_error_from_errno (errno),
-		       g_strerror (errno));
+	  g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                               g_io_channel_error_from_errno (errno),
+                               g_strerror (errno));
 	  return G_IO_STATUS_ERROR;
         }
     }
@@ -1197,9 +1197,9 @@
   tmp_offset = offset;
   if (tmp_offset != offset)
     {
-      g_set_error (err, G_IO_CHANNEL_ERROR,
-		   g_io_channel_error_from_errno (EINVAL),
-		   g_strerror (EINVAL));
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                           g_io_channel_error_from_errno (EINVAL),
+                           g_strerror (EINVAL));
       return G_IO_STATUS_ERROR;
     }
   
@@ -1207,9 +1207,9 @@
   
   if (result < 0)
     {
-      g_set_error (err, G_IO_CHANNEL_ERROR,
-		   g_io_channel_error_from_errno (errno),
-		   g_strerror (errno));
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                           g_io_channel_error_from_errno (errno),
+                           g_strerror (errno));
       return G_IO_STATUS_ERROR;
     }
 
@@ -1303,9 +1303,9 @@
   
   if (close (win32_channel->fd) < 0)
     {
-      g_set_error (err, G_IO_CHANNEL_ERROR,
-		   g_io_channel_error_from_errno (errno),
-		   g_strerror (errno));
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                           g_io_channel_error_from_errno (errno),
+                           g_strerror (errno));
       return G_IO_STATUS_ERROR;
     }
 
@@ -1377,7 +1377,7 @@
 	  error = G_IO_CHANNEL_ERROR_FAILED;
           break;
 	}
-      g_set_error (err, G_IO_CHANNEL_ERROR, error, emsg);
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR, error, emsg);
       g_free (emsg);
 
       return G_IO_STATUS_ERROR;
@@ -1440,7 +1440,7 @@
 	  error = G_IO_CHANNEL_ERROR_FAILED;
           break;
 	}
-      g_set_error (err, G_IO_CHANNEL_ERROR, error, emsg);
+      g_set_error_literal (err, G_IO_CHANNEL_ERROR, error, emsg);
       g_free (emsg);
 
       return G_IO_STATUS_ERROR;
@@ -1600,9 +1600,9 @@
 
   if (fid < 0)
     {
-      g_set_error (error, G_FILE_ERROR,
-                   g_file_error_from_errno (errno),
-                   g_strerror (errno));
+      g_set_error_literal (error, G_FILE_ERROR,
+                           g_file_error_from_errno (errno),
+                           g_strerror (errno));
       return (GIOChannel *)NULL;
     }
 
@@ -1677,9 +1677,9 @@
       g_print ("\n");
     }
 
-  g_set_error (err, G_IO_CHANNEL_ERROR,
-	       G_IO_CHANNEL_ERROR_FAILED,
-	       "Not implemented on Win32");
+  g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+                       G_IO_CHANNEL_ERROR_FAILED,
+                       "Not implemented on Win32");
 
   return G_IO_STATUS_ERROR;
 }
@@ -1785,9 +1785,9 @@
 	{
 	  gchar *emsg = g_win32_error_message (WSAGetLastError ());
 
-	  g_set_error (err, G_IO_CHANNEL_ERROR,
-		       G_IO_CHANNEL_ERROR_FAILED,
-		       emsg);
+	  g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+			       G_IO_CHANNEL_ERROR_FAILED,
+			       emsg);
 	  g_free (emsg);
 
 	  return G_IO_STATUS_ERROR;
@@ -1800,9 +1800,9 @@
 	{
 	  gchar *emsg = g_win32_error_message (WSAGetLastError ());
 
-	  g_set_error (err, G_IO_CHANNEL_ERROR,
-		       G_IO_CHANNEL_ERROR_FAILED,
-		       emsg);
+	  g_set_error_literal (err, G_IO_CHANNEL_ERROR,
+			       G_IO_CHANNEL_ERROR_FAILED,
+			       emsg);
 	  g_free (emsg);
 
 	  return G_IO_STATUS_ERROR;

Modified: trunk/glib/gkeyfile.c
==============================================================================
--- trunk/glib/gkeyfile.c	(original)
+++ trunk/glib/gkeyfile.c	Mon Jun 16 16:53:58 2008
@@ -353,10 +353,10 @@
 
   if (fd < 0)
     {
-      g_set_error (error, G_KEY_FILE_ERROR,
-                   G_KEY_FILE_ERROR_NOT_FOUND,
-                   _("Valid key file could not be "
-                     "found in search dirs"));
+      g_set_error_literal (error, G_KEY_FILE_ERROR,
+                           G_KEY_FILE_ERROR_NOT_FOUND,
+                           _("Valid key file could not be "
+                             "found in search dirs"));
     }
 
   if (output_file != NULL && fd > 0)
@@ -380,25 +380,25 @@
   
   if (fstat (fd, &stat_buf) < 0)
     {
-      g_set_error (error, G_FILE_ERROR,
-                   g_file_error_from_errno (errno),
-                   "%s", g_strerror (errno));
+      g_set_error_literal (error, G_FILE_ERROR,
+                           g_file_error_from_errno (errno),
+                           g_strerror (errno));
       return FALSE;
     }
 
   if (!S_ISREG (stat_buf.st_mode))
     {
-      g_set_error (error, G_KEY_FILE_ERROR,
-                   G_KEY_FILE_ERROR_PARSE,
-                   _("Not a regular file"));
+      g_set_error_literal (error, G_KEY_FILE_ERROR,
+                           G_KEY_FILE_ERROR_PARSE,
+                           _("Not a regular file"));
       return FALSE;
     }
 
   if (stat_buf.st_size == 0)
     {
-      g_set_error (error, G_KEY_FILE_ERROR,
-                   G_KEY_FILE_ERROR_PARSE,
-                   _("File is empty"));
+      g_set_error_literal (error, G_KEY_FILE_ERROR,
+                           G_KEY_FILE_ERROR_PARSE,
+                           _("File is empty"));
       return FALSE;
     }
 
@@ -422,9 +422,9 @@
           if (errno == EINTR || errno == EAGAIN)
             continue;
 
-          g_set_error (error, G_FILE_ERROR,
-                       g_file_error_from_errno (errno),
-                       "%s", g_strerror (errno));
+          g_set_error_literal (error, G_FILE_ERROR,
+                               g_file_error_from_errno (errno),
+                               g_strerror (errno));
           return FALSE;
         }
 
@@ -482,9 +482,9 @@
 
   if (fd < 0)
     {
-      g_set_error (error, G_FILE_ERROR,
-                   g_file_error_from_errno (errno),
-                   "%s", g_strerror (errno));
+      g_set_error_literal (error, G_FILE_ERROR,
+                           g_file_error_from_errno (errno),
+                           g_strerror (errno));
       return FALSE;
     }
 
@@ -838,9 +838,9 @@
 
   if (key_file->current_group == NULL || key_file->current_group->name == NULL)
     {
-      g_set_error (error, G_KEY_FILE_ERROR,
-		   G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
-		   _("Key file does not start with a group"));
+      g_set_error_literal (error, G_KEY_FILE_ERROR,
+                           G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
+                           _("Key file does not start with a group"));
       return;
     }
 
@@ -3469,10 +3469,10 @@
               break;
 
 	    case '\0':
-	      g_set_error (error, G_KEY_FILE_ERROR,
-			   G_KEY_FILE_ERROR_INVALID_VALUE,
-			   _("Key file contains escape character "
-			     "at end of line"));
+	      g_set_error_literal (error, G_KEY_FILE_ERROR,
+                                   G_KEY_FILE_ERROR_INVALID_VALUE,
+                                   _("Key file contains escape character "
+                                     "at end of line"));
 	      break;
 
             default:

Modified: trunk/glib/gregex.c
==============================================================================
--- trunk/glib/gregex.c	(original)
+++ trunk/glib/gregex.c	Mon Jun 16 16:53:58 2008
@@ -1097,7 +1097,7 @@
 	{
 	  msg = N_("PCRE library is compiled without UTF8 support");
 	  g_critical (msg);
-	  g_set_error (error, G_REGEX_ERROR, G_REGEX_ERROR_COMPILE, gettext (msg));
+	  g_set_error_literal (error, G_REGEX_ERROR, G_REGEX_ERROR_COMPILE, gettext (msg));
 	  return NULL;
 	}
 
@@ -1106,7 +1106,7 @@
 	{
 	  msg = N_("PCRE library is compiled without UTF8 properties support");
 	  g_critical (msg);
-	  g_set_error (error, G_REGEX_ERROR, G_REGEX_ERROR_COMPILE, gettext (msg));
+	  g_set_error_literal (error, G_REGEX_ERROR, G_REGEX_ERROR_COMPILE, gettext (msg));
 	  return NULL;
 	}
 

Modified: trunk/glib/gshell.c
==============================================================================
--- trunk/glib/gshell.c	(original)
+++ trunk/glib/gshell.c	Mon Jun 16 16:53:58 2008
@@ -551,10 +551,10 @@
 
   if (retval == NULL)
     {
-      g_set_error (error,
-                   G_SHELL_ERROR,
-                   G_SHELL_ERROR_EMPTY_STRING,
-                   _("Text was empty (or contained only whitespace)"));
+      g_set_error_literal (error,
+                           G_SHELL_ERROR,
+                           G_SHELL_ERROR_EMPTY_STRING,
+                           _("Text was empty (or contained only whitespace)"));
 
       goto error;
     }

Modified: trunk/glib/gspawn-win32.c
==============================================================================
--- trunk/glib/gspawn-win32.c	(original)
+++ trunk/glib/gspawn-win32.c	Mon Jun 16 16:53:58 2008
@@ -275,8 +275,8 @@
     goto again;
   else if (giostatus == G_IO_STATUS_ERROR)
     {
-      g_set_error (error, G_SPAWN_ERROR, G_SPAWN_ERROR_READ,
-                   _("Failed to read data from child process"));
+      g_set_error_literal (error, G_SPAWN_ERROR, G_SPAWN_ERROR_READ,
+                           _("Failed to read data from child process"));
       
       return READ_FAILED;
     }
@@ -998,8 +998,8 @@
         {
           failed = TRUE;
 
-          g_set_error (error, G_SPAWN_ERROR, G_SPAWN_ERROR_READ,
-                       _("Unexpected error in g_io_channel_win32_poll() reading data from a child process"));
+          g_set_error_literal (error, G_SPAWN_ERROR, G_SPAWN_ERROR_READ,
+                               _("Unexpected error in g_io_channel_win32_poll() reading data from a child process"));
 	  
           break;
         }

Modified: trunk/glib/gutf8.c
==============================================================================
--- trunk/glib/gutf8.c	(original)
+++ trunk/glib/gutf8.c	Mon Jun 16 16:53:58 2008
@@ -948,12 +948,12 @@
 	      if (items_read)
 		break;
 	      else
-		g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
-			     _("Partial character sequence at end of input"));
+		g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
+                                     _("Partial character sequence at end of input"));
 	    }
 	  else
-	    g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-			 _("Invalid byte sequence in conversion input"));
+	    g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                                 _("Invalid byte sequence in conversion input"));
 
 	  goto err_out;
 	}
@@ -1026,8 +1026,8 @@
 
       if (str[i] >= 0x80000000)
 	{
-	  g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-		       _("Character out of range for UTF-8"));
+	  g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                               _("Character out of range for UTF-8"));
 	  goto err_out;
 	}
       
@@ -1120,8 +1120,8 @@
 	    }
 	  else
 	    {
-	      g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-			   _("Invalid sequence in conversion input"));
+	      g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                                   _("Invalid sequence in conversion input"));
 	      goto err_out;
 	    }
 	}
@@ -1129,8 +1129,8 @@
 	{
 	  if (high_surrogate)
 	    {
-	      g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-			   _("Invalid sequence in conversion input"));
+	      g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                                   _("Invalid sequence in conversion input"));
 	      goto err_out;
 	    }
 
@@ -1152,8 +1152,8 @@
 
   if (high_surrogate && !items_read)
     {
-      g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
-		   _("Partial character sequence at end of input"));
+      g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
+                           _("Partial character sequence at end of input"));
       goto err_out;
     }
   
@@ -1261,8 +1261,8 @@
 	    }
 	  else
 	    {
-	      g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-			   _("Invalid sequence in conversion input"));
+	      g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                                   _("Invalid sequence in conversion input"));
 	      goto err_out;
 	    }
 	}
@@ -1270,8 +1270,8 @@
 	{
 	  if (high_surrogate)
 	    {
-	      g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-			   _("Invalid sequence in conversion input"));
+	      g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                                   _("Invalid sequence in conversion input"));
 	      goto err_out;
 	    }
 
@@ -1293,8 +1293,8 @@
 
   if (high_surrogate && !items_read)
     {
-      g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
-		   _("Partial character sequence at end of input"));
+      g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
+                           _("Partial character sequence at end of input"));
       goto err_out;
     }
   
@@ -1397,12 +1397,12 @@
 	      if (items_read)
 		break;
 	      else
-		g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
-			     _("Partial character sequence at end of input"));
+		g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
+                                     _("Partial character sequence at end of input"));
 	    }
 	  else
-	    g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-			 _("Invalid byte sequence in conversion input"));
+	    g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                                 _("Invalid byte sequence in conversion input"));
 
 	  goto err_out;
 	}
@@ -1411,8 +1411,8 @@
 	n16 += 1;
       else if (wc < 0xe000)
 	{
-	  g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-		       _("Invalid sequence in conversion input"));
+	  g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                               _("Invalid sequence in conversion input"));
 
 	  goto err_out;
 	}
@@ -1422,8 +1422,8 @@
 	n16 += 2;
       else
 	{
-	  g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-		       _("Character out of range for UTF-16"));
+	  g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                               _("Character out of range for UTF-16"));
 
 	  goto err_out;
 	}
@@ -1507,8 +1507,8 @@
 	n16 += 1;
       else if (wc < 0xe000)
 	{
-	  g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-		       _("Invalid sequence in conversion input"));
+	  g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                               _("Invalid sequence in conversion input"));
 
 	  goto err_out;
 	}
@@ -1518,8 +1518,8 @@
 	n16 += 2;
       else
 	{
-	  g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-		       _("Character out of range for UTF-16"));
+	  g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+                               _("Character out of range for UTF-16"));
 
 	  goto err_out;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]