[glib] Don't use G_DISABLE_DEPRECATED guards around deprecated functions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Don't use G_DISABLE_DEPRECATED guards around deprecated functions
- Date: Thu, 3 Nov 2011 04:17:24 +0000 (UTC)
commit 03766a1a38407fbbbf8c30874e6f8d46e2b0da43
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Nov 3 00:04:15 2011 -0400
Don't use G_DISABLE_DEPRECATED guards around deprecated functions
I'm leaving the old-style deprecation guards in place around
deprecated macros, enumeration values, etc, for now.
glib/gasyncqueue.h | 2 --
glib/gatomic.h | 2 --
glib/gfileutils.h | 6 ++----
glib/ghash.h | 4 +---
glib/giochannel.c | 2 --
glib/giochannel.h | 2 --
glib/glib.h | 2 --
glib/gmain.h | 3 +--
glib/gmappedfile.h | 2 --
glib/gmessages.h | 3 +--
glib/gstrfuncs.h | 8 --------
glib/gstring.h | 6 ++----
glib/gtree.h | 2 --
glib/gunicode.h | 3 ---
glib/gutils.h | 2 +-
15 files changed, 8 insertions(+), 41 deletions(-)
---
diff --git a/glib/gasyncqueue.h b/glib/gasyncqueue.h
index 5c362d2..e8fd0bf 100644
--- a/glib/gasyncqueue.h
+++ b/glib/gasyncqueue.h
@@ -44,13 +44,11 @@ void g_async_queue_unlock (GAsyncQueue *queue);
GAsyncQueue *g_async_queue_ref (GAsyncQueue *queue);
void g_async_queue_unref (GAsyncQueue *queue);
-#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_async_queue_ref)
void g_async_queue_ref_unlocked (GAsyncQueue *queue);
GLIB_DEPRECATED_FOR(g_async_queue_unref)
void g_async_queue_unref_and_unlock (GAsyncQueue *queue);
-#endif /* !G_DISABLE_DEPRECATED */
void g_async_queue_push (GAsyncQueue *queue,
gpointer data);
diff --git a/glib/gatomic.h b/glib/gatomic.h
index 376ccc1..41df1db 100644
--- a/glib/gatomic.h
+++ b/glib/gatomic.h
@@ -62,11 +62,9 @@ gsize g_atomic_pointer_or (volatile void *a
gsize g_atomic_pointer_xor (volatile void *atomic,
gsize val);
-#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_atomic_add)
gint g_atomic_int_exchange_and_add (volatile gint *atomic,
gint val);
-#endif
G_END_DECLS
diff --git a/glib/gfileutils.h b/glib/gfileutils.h
index 2a13dca..f591461 100644
--- a/glib/gfileutils.h
+++ b/glib/gfileutils.h
@@ -155,13 +155,11 @@ gint g_mkdir_with_parents (const gchar *pathname,
gboolean g_path_is_absolute (const gchar *file_name);
const gchar *g_path_skip_root (const gchar *file_name);
-#ifndef G_DISABLE_DEPRECATED
-
GLIB_DEPRECATED_FOR(g_path_get_basename)
const gchar *g_basename (const gchar *file_name);
+#ifndef G_DISABLE_DEPRECATED
#define g_dirname g_path_get_dirname
-
-#endif /* G_DISABLE_DEPRECATED */
+#endif
#ifndef __GTK_DOC_IGNORE__
#ifdef G_OS_WIN32
diff --git a/glib/ghash.h b/glib/ghash.h
index 2e3184a..fdff5fd 100644
--- a/glib/ghash.h
+++ b/glib/ghash.h
@@ -111,11 +111,9 @@ GHashTable* g_hash_table_ref (GHashTable *hash_table);
void g_hash_table_unref (GHashTable *hash_table);
#ifndef G_DISABLE_DEPRECATED
-
#define g_hash_table_freeze(hash_table) ((void)0)
#define g_hash_table_thaw(hash_table) ((void)0)
-
-#endif /* G_DISABLE_DEPRECATED */
+#endif
/* Hash Functions
*/
diff --git a/glib/giochannel.c b/glib/giochannel.c
index ff971f3..38bd38a 100644
--- a/glib/giochannel.c
+++ b/glib/giochannel.c
@@ -40,8 +40,6 @@
#include <unistd.h>
#endif
-#undef G_DISABLE_DEPRECATED
-
#include "giochannel.h"
#include "gstrfuncs.h"
diff --git a/glib/giochannel.h b/glib/giochannel.h
index 1278714..8d3f2d7 100644
--- a/glib/giochannel.h
+++ b/glib/giochannel.h
@@ -173,7 +173,6 @@ void g_io_channel_init (GIOChannel *channel);
GIOChannel *g_io_channel_ref (GIOChannel *channel);
void g_io_channel_unref (GIOChannel *channel);
-#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_io_channel_read_for)
GIOError g_io_channel_read (GIOChannel *channel,
gchar *buf,
@@ -193,7 +192,6 @@ GIOError g_io_channel_seek (GIOChannel *channel,
GLIB_DEPRECATED_FOR(g_io_channel_shutdown)
void g_io_channel_close (GIOChannel *channel);
-#endif /* G_DISABLE_DEPRECATED */
GIOStatus g_io_channel_shutdown (GIOChannel *channel,
gboolean flush,
diff --git a/glib/glib.h b/glib/glib.h
index ee29839..350c62b 100644
--- a/glib/glib.h
+++ b/glib/glib.h
@@ -98,13 +98,11 @@
#include <glib/gwin32.h>
#endif
-#ifndef G_DISABLE_DEPRECATED
#include <glib/deprecated/gallocator.h>
#include <glib/deprecated/gcache.h>
#include <glib/deprecated/gcompletion.h>
#include <glib/deprecated/grel.h>
#include <glib/deprecated/gthread.h>
-#endif
#undef __GLIB_H_INSIDE__
diff --git a/glib/gmain.h b/glib/gmain.h
index 87ca4d6..d30b45c 100644
--- a/glib/gmain.h
+++ b/glib/gmain.h
@@ -407,11 +407,10 @@ void g_source_add_child_source (GSource *source,
void g_source_remove_child_source (GSource *source,
GSource *child_source);
-#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_source_get_time)
void g_source_get_current_time (GSource *source,
GTimeVal *timeval);
-#endif
+
gint64 g_source_get_time (GSource *source);
/* void g_source_connect_closure (GSource *source,
diff --git a/glib/gmappedfile.h b/glib/gmappedfile.h
index f697d8a..f48b141 100644
--- a/glib/gmappedfile.h
+++ b/glib/gmappedfile.h
@@ -43,10 +43,8 @@ gchar *g_mapped_file_get_contents (GMappedFile *file);
GMappedFile *g_mapped_file_ref (GMappedFile *file);
void g_mapped_file_unref (GMappedFile *file);
-#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_mapped_file_unref)
void g_mapped_file_free (GMappedFile *file);
-#endif
G_END_DECLS
diff --git a/glib/gmessages.h b/glib/gmessages.h
index 8e174cc..9cbcc83 100644
--- a/glib/gmessages.h
+++ b/glib/gmessages.h
@@ -121,13 +121,12 @@ void g_warn_message (const char *domain,
int line,
const char *func,
const char *warnexpr);
-#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED
void g_assert_warning (const char *log_domain,
const char *file,
const int line,
const char *pretty_function,
const char *expression) G_GNUC_NORETURN;
-#endif /* !G_DISABLE_DEPRECATED */
#ifndef G_LOG_DOMAIN
diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h
index 8d36c99..68c89fd 100644
--- a/glib/gstrfuncs.h
+++ b/glib/gstrfuncs.h
@@ -167,17 +167,10 @@ gchar* g_ascii_strdown (const gchar *str,
gchar* g_ascii_strup (const gchar *str,
gssize len) G_GNUC_MALLOC;
-#ifndef G_DISABLE_DEPRECATED
-
-/* The following four functions are deprecated and will be removed in
- * the next major release. They use the locale-specific tolower and
- * toupper, which is almost never the right thing.
- */
GLIB_DEPRECATED
gint g_strcasecmp (const gchar *s1,
const gchar *s2);
-
GLIB_DEPRECATED
gint g_strncasecmp (const gchar *s1,
const gchar *s2,
@@ -187,7 +180,6 @@ gchar* g_strdown (gchar *string);
GLIB_DEPRECATED
gchar* g_strup (gchar *string);
-#endif /* G_DISABLE_DEPRECATED */
/* String utility functions that return a newly allocated string which
* ought to be freed with g_free from the caller at some point.
diff --git a/glib/gstring.h b/glib/gstring.h
index 80d7b1e..0797343 100644
--- a/glib/gstring.h
+++ b/glib/gstring.h
@@ -140,17 +140,15 @@ g_string_append_c_inline (GString *gstring,
#endif /* G_CAN_INLINE */
-#ifndef G_DISABLE_DEPRECATED
-
GLIB_DEPRECATED
GString *g_string_down (GString *string);
GLIB_DEPRECATED
GString *g_string_up (GString *string);
+#ifndef G_DISABLE_DEPRECATED
#define g_string_sprintf g_string_printf
#define g_string_sprintfa g_string_append_printf
-
-#endif /* G_DISABLE_DEPRECATED */
+#endif
G_END_DECLS
diff --git a/glib/gtree.h b/glib/gtree.h
index b4a6ce6..e17a518 100644
--- a/glib/gtree.h
+++ b/glib/gtree.h
@@ -73,13 +73,11 @@ void g_tree_foreach (GTree *tree,
GTraverseFunc func,
gpointer user_data);
-#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED
void g_tree_traverse (GTree *tree,
GTraverseFunc traverse_func,
GTraverseType traverse_type,
gpointer user_data);
-#endif /* G_DISABLE_DEPRECATED */
gpointer g_tree_search (GTree *tree,
GCompareFunc search_func,
diff --git a/glib/gunicode.h b/glib/gunicode.h
index 71ebbba..213b38f 100644
--- a/glib/gunicode.h
+++ b/glib/gunicode.h
@@ -558,12 +558,9 @@ void g_unicode_canonical_ordering (gunichar *string,
gsize len);
-#ifndef G_DISABLE_DEPRECATED
-/* Deprecated. Use g_unichar_fully_decompose() */
GLIB_DEPRECATED
gunichar *g_unicode_canonical_decomposition (gunichar ch,
gsize *result_len) G_GNUC_MALLOC;
-#endif
/* Array of skip-bytes-per-initial character.
*/
diff --git a/glib/gutils.h b/glib/gutils.h
index b365701..95114d8 100644
--- a/glib/gutils.h
+++ b/glib/gutils.h
@@ -211,10 +211,10 @@ gchar *g_format_size_full (guint64 size,
GFormatSizeFlags flags);
gchar *g_format_size (guint64 size);
-#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_format_size)
gchar *g_format_size_for_display (goffset size);
+#ifndef G_DISABLE_DEPRECATED
/**
* GVoidFunc:
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]