[libgnome] Deprecate gnome_[un]setenv



commit c537aa9da25a698750aa7d4d67defc92b7568402
Author: Christian Persch <chpe gnome org>
Date:   Mon Nov 30 14:16:56 2009 +0100

    Deprecate gnome_[un]setenv
    
    Just use g_[un]setenv instead.

 libgnome/gnome-util.c |    3 +++
 libgnome/gnome-util.h |    3 ++-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libgnome/gnome-util.c b/libgnome/gnome-util.c
index 0583a9b..a8fec97 100644
--- a/libgnome/gnome-util.c
+++ b/libgnome/gnome-util.c
@@ -179,6 +179,7 @@ g_extension_pointer (const char * path)
  *
  * Returns: %0 on success, %-1 on error
  *
+ * @Deprecated: 2.30: Use g_setenv() instead
  **/
 int
 gnome_setenv (const char *name, const char *value, gboolean overwrite)
@@ -210,6 +211,7 @@ gnome_setenv (const char *name, const char *value, gboolean overwrite)
  * this could cause leaks depending on the implementation of
  * environment.
  *
+ * @Deprecated: 2.30: Use g_unsetenv() instead
  **/
 void
 gnome_unsetenv (const char *name)
@@ -246,6 +248,7 @@ gnome_unsetenv (const char *name)
  * this could cause leaks depending on the implementation
  * of environment.
  *
+ * @Deprecated: 2.30
  **/
 void
 gnome_clearenv (void)
diff --git a/libgnome/gnome-util.h b/libgnome/gnome-util.h
index ca258f6..15be05b 100644
--- a/libgnome/gnome-util.h
+++ b/libgnome/gnome-util.h
@@ -54,6 +54,8 @@ const char * g_extension_pointer (const char * path);
 /* Find the name of the user's shell.  */
 char *gnome_util_user_shell (void);
 
+#ifndef GNOME_DISABLE_DEPRECATED
+
 /* Portable versions of setenv/unsetenv */
 
 /* Note: setenv will leak on some systems (those without setenv) so
@@ -63,7 +65,6 @@ void	gnome_unsetenv (const char *name);
 void	gnome_clearenv (void);
 
 /* Some deprecated functions macroed to their new equivalents */
-#ifndef GNOME_DISABLE_DEPRECATED
 
 #define g_file_exists(filename)		g_file_test ((filename), G_FILE_TEST_EXISTS)
 #define g_unix_error_string(error_num)	g_strerror ((error_num))



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