Use GLIB_DEPRECATED instead of G_GNUC_DEPRECATED in our headers

This will let others opt out of seeing GLib deprecation warnings
by defining GLIB_DISABLE_DEPRECATION_WARNINGS.

https://bugzilla.gnome.org/show_bug.cgi?id=661438
This commit is contained in:
Chun-wei Fan 2011-10-11 14:34:59 +08:00 committed by Matthias Clasen
parent a1acf35653
commit 08d6e1147d
26 changed files with 229 additions and 108 deletions

View File

@ -165,14 +165,17 @@ gboolean g_drive_is_media_check_automatic (GDrive *drive);
gboolean g_drive_can_poll_for_media (GDrive *drive);
gboolean g_drive_can_eject (GDrive *drive);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_drive_eject_with_operation)
void g_drive_eject (GDrive *drive,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data) G_GNUC_DEPRECATED_FOR(g_drive_eject_with_operation);
gpointer user_data);
GLIB_DEPRECATED_FOR(g_drive_eject_with_operation_finish)
gboolean g_drive_eject_finish (GDrive *drive,
GAsyncResult *result,
GError **error) G_GNUC_DEPRECATED_FOR(g_drive_eject_with_operation_finish);
GError **error);
#endif
void g_drive_poll_for_media (GDrive *drive,
GCancellable *cancellable,

View File

@ -870,14 +870,17 @@ GFile * g_file_mount_mountable_finish (GFile
GAsyncResult *result,
GError **error);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation)
void g_file_unmount_mountable (GFile *file,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data) G_GNUC_DEPRECATED_FOR(g_file_unmount_mountable_with_operation);
gpointer user_data);
GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish)
gboolean g_file_unmount_mountable_finish (GFile *file,
GAsyncResult *result,
GError **error) G_GNUC_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish);
GError **error);
#endif
void g_file_unmount_mountable_with_operation (GFile *file,
GMountUnmountFlags flags,
@ -889,14 +892,17 @@ gboolean g_file_unmount_mountable_with_operation_finish (GFile
GAsyncResult *result,
GError **error);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation)
void g_file_eject_mountable (GFile *file,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data) G_GNUC_DEPRECATED_FOR(g_file_eject_mountable_with_operation);
gpointer user_data);
GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish)
gboolean g_file_eject_mountable_finish (GFile *file,
GAsyncResult *result,
GError **error) G_GNUC_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish);
GError **error);
#endif
void g_file_eject_mountable_with_operation (GFile *file,
GMountUnmountFlags flags,

View File

@ -171,23 +171,29 @@ gboolean g_mount_can_unmount (GMount *mount);
gboolean g_mount_can_eject (GMount *mount);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_mount_unmount_with_operation)
void g_mount_unmount (GMount *mount,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data) G_GNUC_DEPRECATED_FOR(g_mount_unmount_with_operation);
gpointer user_data);
GLIB_DEPRECATED_FOR(g_mount_unmount_with_operation_finish)
gboolean g_mount_unmount_finish (GMount *mount,
GAsyncResult *result,
GError **error) G_GNUC_DEPRECATED_FOR(g_mount_unmount_with_operation_finish);
GError **error);
GLIB_DEPRECATED_FOR(g_mount_eject_with_operation)
void g_mount_eject (GMount *mount,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data) G_GNUC_DEPRECATED_FOR(g_mount_eject_with_operation);
gpointer user_data);
GLIB_DEPRECATED_FOR(g_mount_eject_with_operation_finish)
gboolean g_mount_eject_finish (GMount *mount,
GAsyncResult *result,
GError **error) G_GNUC_DEPRECATED_FOR(g_mount_eject_with_operation_finish);
GError **error);
#endif
void g_mount_remount (GMount *mount,

View File

@ -84,9 +84,10 @@ struct _GTlsConnectionClass
GType g_tls_connection_get_type (void) G_GNUC_CONST;
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED
void g_tls_connection_set_use_system_certdb (GTlsConnection *conn,
gboolean use_system_certdb) G_GNUC_DEPRECATED;
gboolean g_tls_connection_get_use_system_certdb (GTlsConnection *conn) G_GNUC_DEPRECATED;
gboolean use_system_certdb);
GLIB_DEPRECATED gboolean g_tls_connection_get_use_system_certdb (GTlsConnection *conn);
#endif /* G_DISABLE_DEPRECATED */
void g_tls_connection_set_database (GTlsConnection *conn,

View File

@ -56,8 +56,9 @@ GType g_unix_socket_address_get_type (void) G_GNUC_CONST;
GSocketAddress *g_unix_socket_address_new (const gchar *path);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_unix_socket_address_new_with_type)
GSocketAddress *g_unix_socket_address_new_abstract (const gchar *path,
gint path_len) G_GNUC_DEPRECATED_FOR(g_unix_socket_address_new_with_type);
gint path_len);
#endif
GSocketAddress *g_unix_socket_address_new_with_type (const gchar *path,
gint path_len,
@ -66,7 +67,8 @@ const char * g_unix_socket_address_get_path (GUnixSocketAddress *addre
gsize g_unix_socket_address_get_path_len (GUnixSocketAddress *address);
GUnixSocketAddressType g_unix_socket_address_get_address_type (GUnixSocketAddress *address);
#ifndef G_DISABLE_DEPRECATED
gboolean g_unix_socket_address_get_is_abstract (GUnixSocketAddress *address) G_GNUC_DEPRECATED;
GLIB_DEPRECATED
gboolean g_unix_socket_address_get_is_abstract (GUnixSocketAddress *address);
#endif
gboolean g_unix_socket_address_abstract_names_supported (void);

View File

@ -181,14 +181,17 @@ gboolean g_volume_mount_finish (GVolume *volume,
GAsyncResult *result,
GError **error);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_volume_eject_with_operation)
void g_volume_eject (GVolume *volume,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data) G_GNUC_DEPRECATED_FOR(g_volume_eject_with_operation);
gpointer user_data);
GLIB_DEPRECATED_FOR(g_volume_eject_with_operation_finish)
gboolean g_volume_eject_finish (GVolume *volume,
GAsyncResult *result,
GError **error) G_GNUC_DEPRECATED_FOR(g_volume_eject_with_operation_finish);
GError **error);
#endif
char * g_volume_get_identifier (GVolume *volume,
const char *kind);

View File

@ -56,21 +56,29 @@ struct _GCompletion
GCompletionStrncmpFunc strncmp_func;
};
GCompletion* g_completion_new (GCompletionFunc func) G_GNUC_DEPRECATED;
GLIB_DEPRECATED
GCompletion* g_completion_new (GCompletionFunc func);
GLIB_DEPRECATED
void g_completion_add_items (GCompletion* cmp,
GList* items) G_GNUC_DEPRECATED;
GList* items);
GLIB_DEPRECATED
void g_completion_remove_items (GCompletion* cmp,
GList* items) G_GNUC_DEPRECATED;
GList* items);
GLIB_DEPRECATED
void g_completion_clear_items (GCompletion* cmp);
GLIB_DEPRECATED
GList* g_completion_complete (GCompletion* cmp,
const gchar* prefix,
gchar** new_prefix) G_GNUC_DEPRECATED;
gchar** new_prefix);
GLIB_DEPRECATED
GList* g_completion_complete_utf8 (GCompletion *cmp,
const gchar* prefix,
gchar** new_prefix) G_GNUC_DEPRECATED;
gchar** new_prefix);
GLIB_DEPRECATED
void g_completion_set_compare (GCompletion *cmp,
GCompletionStrncmpFunc strncmp_func) G_GNUC_DEPRECATED;
void g_completion_free (GCompletion* cmp) G_GNUC_DEPRECATED;
GCompletionStrncmpFunc strncmp_func);
GLIB_DEPRECATED
void g_completion_free (GCompletion* cmp);
G_END_DECLS

View File

@ -66,31 +66,41 @@ struct _GTuples
* g_relation_count() counts ...
*/
GRelation* g_relation_new (gint fields) G_GNUC_DEPRECATED;
void g_relation_destroy (GRelation *relation) G_GNUC_DEPRECATED;
GLIB_DEPRECATED
GRelation* g_relation_new (gint fields);
GLIB_DEPRECATED
void g_relation_destroy (GRelation *relation);
GLIB_DEPRECATED
void g_relation_index (GRelation *relation,
gint field,
GHashFunc hash_func,
GEqualFunc key_equal_func) G_GNUC_DEPRECATED;
GEqualFunc key_equal_func);
GLIB_DEPRECATED
void g_relation_insert (GRelation *relation,
...) G_GNUC_DEPRECATED;
...);
GLIB_DEPRECATED
gint g_relation_delete (GRelation *relation,
gconstpointer key,
gint field) G_GNUC_DEPRECATED;
gint field);
GLIB_DEPRECATED
GTuples* g_relation_select (GRelation *relation,
gconstpointer key,
gint field) G_GNUC_DEPRECATED;
gint field);
GLIB_DEPRECATED
gint g_relation_count (GRelation *relation,
gconstpointer key,
gint field) G_GNUC_DEPRECATED;
gint field);
GLIB_DEPRECATED
gboolean g_relation_exists (GRelation *relation,
...);
void g_relation_print (GRelation *relation) G_GNUC_DEPRECATED;
void g_tuples_destroy (GTuples *tuples) G_GNUC_DEPRECATED;
GLIB_DEPRECATED
void g_relation_print (GRelation *relation);
GLIB_DEPRECATED
void g_tuples_destroy (GTuples *tuples);
GLIB_DEPRECATED
gpointer g_tuples_index (GTuples *tuples,
gint index_,
gint field) G_GNUC_DEPRECATED;
gint field);
G_END_DECLS

View File

@ -96,23 +96,28 @@ GLIB_VAR gboolean g_thread_use_default_impl;
GLIB_VAR guint64 (*g_thread_gettime) (void);
GThread* g_thread_create (GThreadFunc func,
gpointer data,
gboolean joinable,
GError **error) G_GNUC_DEPRECATED_FOR(g_thread_new);
GThread* g_thread_create_full (GThreadFunc func,
gpointer data,
gulong stack_size,
gboolean joinable,
gboolean bound,
GThreadPriority priority,
GError **error) G_GNUC_DEPRECATED_FOR(g_thread_new_full);
GLIB_DEPRECATED_FOR(g_thread_new)
GThread *g_thread_create (GThreadFunc func,
gpointer data,
gboolean joinable,
GError **error);
void g_thread_set_priority (GThread *thread,
GThreadPriority priority) G_GNUC_DEPRECATED;
GLIB_DEPRECATED_FOR(g_thread_new_full)
GThread *g_thread_create_full (GThreadFunc func,
gpointer data,
gulong stack_size,
gboolean joinable,
gboolean bound,
GThreadPriority priority,
GError **error);
void g_thread_foreach (GFunc thread_func,
gpointer user_data) G_GNUC_DEPRECATED;
GLIB_DEPRECATED
void g_thread_set_priority (GThread *thread,
GThreadPriority priority);
GLIB_DEPRECATED
void g_thread_foreach (GFunc thread_func,
gpointer user_data);
#ifndef G_OS_WIN32
#include <pthread.h>
@ -135,9 +140,12 @@ typedef struct
g_mutex_trylock (g_static_mutex_get_mutex (mutex))
#define g_static_mutex_unlock(mutex) \
g_mutex_unlock (g_static_mutex_get_mutex (mutex))
void g_static_mutex_init (GStaticMutex *mutex) G_GNUC_DEPRECATED_FOR(g_mutex_init);
void g_static_mutex_free (GStaticMutex *mutex) G_GNUC_DEPRECATED_FOR(g_mutex_free);
GMutex* g_static_mutex_get_mutex_impl (GStaticMutex *mutex);
GLIB_DEPRECATED_FOR(g_mutex_init)
void g_static_mutex_init (GStaticMutex *mutex);
GLIB_DEPRECATED_FOR(g_mutex_free)
void g_static_mutex_free (GStaticMutex *mutex);
GMutex *g_static_mutex_get_mutex_impl (GStaticMutex *mutex);
typedef struct _GStaticRecMutex GStaticRecMutex;
struct _GStaticRecMutex
@ -149,14 +157,27 @@ struct _GStaticRecMutex
};
#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT, 0, {{0, 0, 0, 0}} }
void g_static_rec_mutex_init (GStaticRecMutex *mutex) G_GNUC_DEPRECATED_FOR(g_rec_mutex_init);
void g_static_rec_mutex_lock (GStaticRecMutex *mutex) G_GNUC_DEPRECATED_FOR(g_rec_mutex_lock);
gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex) G_GNUC_DEPRECATED_FOR(g_rec_mutex_try_lock);
void g_static_rec_mutex_unlock (GStaticRecMutex *mutex) G_GNUC_DEPRECATED_FOR(g_rec_mutex_unlock);
GLIB_DEPRECATED_FOR(g_rec_mutex_init)
void g_static_rec_mutex_init (GStaticRecMutex *mutex);
GLIB_DEPRECATED_FOR(g_rec_mutex_lock)
void g_static_rec_mutex_lock (GStaticRecMutex *mutex);
GLIB_DEPRECATED_FOR(g_rec_mutex_try_lock)
gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex);
GLIB_DEPRECATED_FOR(g_rec_mutex_unlock)
void g_static_rec_mutex_unlock (GStaticRecMutex *mutex);
GLIB_DEPRECATED
void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex,
guint depth) G_GNUC_DEPRECATED;
guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex) G_GNUC_DEPRECATED;
void g_static_rec_mutex_free (GStaticRecMutex *mutex) G_GNUC_DEPRECATED_FOR(g_rec_mutex_free);
guint depth);
GLIB_DEPRECATED
guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex);
GLIB_DEPRECATED_FOR(g_rec_mutex_free)
void g_static_rec_mutex_free (GStaticRecMutex *mutex);
typedef struct _GStaticRWLock GStaticRWLock;
struct _GStaticRWLock
@ -173,16 +194,32 @@ struct _GStaticRWLock
#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 }
void g_static_rw_lock_init (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_init);
void g_static_rw_lock_reader_lock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_reader_lock);
gboolean g_static_rw_lock_reader_trylock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_reader_trylock);
void g_static_rw_lock_reader_unlock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_reader_unlock);
void g_static_rw_lock_writer_lock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_writer_lock);
gboolean g_static_rw_lock_writer_trylock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_writer_trylock);
void g_static_rw_lock_writer_unlock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_writer_unlock);
void g_static_rw_lock_free (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_free);
GLIB_DEPRECATED_FOR(g_rw_lock_init)
void g_static_rw_lock_init (GStaticRWLock *lock);
GPrivate * g_private_new (GDestroyNotify notify) G_GNUC_DEPRECATED;
GLIB_DEPRECATED_FOR(g_rw_lock_reader_lock)
void g_static_rw_lock_reader_lock (GStaticRWLock *lock);
GLIB_DEPRECATED_FOR(g_rw_lock_reader_trylock)
gboolean g_static_rw_lock_reader_trylock (GStaticRWLock *lock);
GLIB_DEPRECATED_FOR(g_rw_lock_reader_unlock)
void g_static_rw_lock_reader_unlock (GStaticRWLock *lock);
GLIB_DEPRECATED_FOR(g_rw_lock_writer_lock)
void g_static_rw_lock_writer_lock (GStaticRWLock *lock);
GLIB_DEPRECATED_FOR(g_rw_lock_writer_trylock)
gboolean g_static_rw_lock_writer_trylock (GStaticRWLock *lock);
GLIB_DEPRECATED_FOR(g_rw_lock_writer_unlock)
void g_static_rw_lock_writer_unlock (GStaticRWLock *lock);
GLIB_DEPRECATED_FOR(g_rw_lock_free)
void g_static_rw_lock_free (GStaticRWLock *lock);
GLIB_DEPRECATED
GPrivate * g_private_new (GDestroyNotify notify);
typedef struct _GStaticPrivate GStaticPrivate;
struct _GStaticPrivate
@ -192,18 +229,28 @@ struct _GStaticPrivate
};
#define G_STATIC_PRIVATE_INIT { 0 }
void g_static_private_init (GStaticPrivate *private_key) G_GNUC_DEPRECATED;
gpointer g_static_private_get (GStaticPrivate *private_key) G_GNUC_DEPRECATED_FOR(g_private_get);
void g_static_private_set (GStaticPrivate *private_key,
gpointer data,
GDestroyNotify notify) G_GNUC_DEPRECATED_FOR(g_private_set);
void g_static_private_free (GStaticPrivate *private_key) G_GNUC_DEPRECATED;
GLIB_DEPRECATED
void g_static_private_init (GStaticPrivate *private_key);
gboolean g_once_init_enter_impl (volatile gsize *location) G_GNUC_DEPRECATED;
GLIB_DEPRECATED_FOR(g_private_get)
gpointer g_static_private_get (GStaticPrivate *private_key);
void g_thread_init (gpointer vtable) G_GNUC_DEPRECATED;
GLIB_DEPRECATED_FOR(g_private_set)
void g_static_private_set (GStaticPrivate *private_key,
gpointer data,
GDestroyNotify notify);
gboolean g_thread_get_initialized (void) G_GNUC_DEPRECATED;
GLIB_DEPRECATED
void g_static_private_free (GStaticPrivate *private_key);
GLIB_DEPRECATED
gboolean g_once_init_enter_impl (volatile gsize *location);
GLIB_DEPRECATED
void g_thread_init (gpointer vtable);
GLIB_DEPRECATED
gboolean g_thread_get_initialized (void);
GLIB_VAR gboolean g_threads_got_initialized;
@ -213,10 +260,14 @@ GLIB_VAR gboolean g_threads_got_initialized;
#define g_thread_supported() (g_threads_got_initialized)
#endif
GMutex * g_mutex_new (void) G_GNUC_DEPRECATED;
void g_mutex_free (GMutex *mutex) G_GNUC_DEPRECATED;
GCond * g_cond_new (void) G_GNUC_DEPRECATED;
void g_cond_free (GCond *cond) G_GNUC_DEPRECATED;
GLIB_DEPRECATED
GMutex * g_mutex_new (void);
GLIB_DEPRECATED
void g_mutex_free (GMutex *mutex) ;
GLIB_DEPRECATED
GCond * g_cond_new (void);
GLIB_DEPRECATED
void g_cond_free (GCond *cond);
G_END_DECLS

View File

@ -45,8 +45,11 @@ GAsyncQueue *g_async_queue_ref (GAsyncQueue *queue);
void g_async_queue_unref (GAsyncQueue *queue);
#ifndef G_DISABLE_DEPRECATED
void g_async_queue_ref_unlocked (GAsyncQueue *queue) G_GNUC_DEPRECATED_FOR(g_async_queue_ref);
void g_async_queue_unref_and_unlock (GAsyncQueue *queue) G_GNUC_DEPRECATED_FOR(g_async_queue_unref);
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,

View File

@ -63,8 +63,9 @@ gsize g_atomic_pointer_xor (volatile void *a
gsize val);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_atomic_add)
gint g_atomic_int_exchange_and_add (volatile gint *atomic,
gint val) G_GNUC_DEPRECATED_FOR(g_atomic_add);
gint val);
#endif
G_END_DECLS

View File

@ -59,9 +59,10 @@ void g_cache_key_foreach (GCache *cache,
GHFunc func,
gpointer user_data);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_cache_key_foreach)
void g_cache_value_foreach (GCache *cache,
GHFunc func,
gpointer user_data) G_GNUC_DEPRECATED_FOR(g_cache_key_foreach);
gpointer user_data);
#endif
G_END_DECLS

View File

@ -175,8 +175,9 @@ void g_date_set_time_t (GDate *date,
void g_date_set_time_val (GDate *date,
GTimeVal *timeval);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_date_set_time_t)
void g_date_set_time (GDate *date,
GTime time_) G_GNUC_DEPRECATED_FOR(g_date_set_time_t);
GTime time_);
#endif
void g_date_set_month (GDate *date,
GDateMonth month);

View File

@ -129,7 +129,8 @@ gchar * g_format_size_full (guint64 size,
gchar * g_format_size (guint64 size);
#ifndef G_DISABLE_DEPRECATED
char *g_format_size_for_display (goffset size) G_GNUC_DEPRECATED_FOR(g_format_size);
GLIB_DEPRECATED_FOR(g_format_size)
char *g_format_size_for_display (goffset size);
#endif
gchar *g_build_path (const gchar *separator,

View File

@ -174,18 +174,25 @@ 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,
gsize count,
gsize *bytes_read) G_GNUC_DEPRECATED_FOR(g_io_channel_read_for);
gsize *bytes_read);
GLIB_DEPRECATED_FOR(g_io_channel_write_chars)
GIOError g_io_channel_write (GIOChannel *channel,
const gchar *buf,
gsize count,
gsize *bytes_written) G_GNUC_DEPRECATED_FOR(g_io_channel_write_chars);
gsize *bytes_written);
GLIB_DEPRECATED_FOR(g_io_channel_seek_position)
GIOError g_io_channel_seek (GIOChannel *channel,
gint64 offset,
GSeekType type) G_GNUC_DEPRECATED_FOR(g_io_channel_seek_position);
void g_io_channel_close (GIOChannel *channel) G_GNUC_DEPRECATED_FOR(g_io_channel_shutdown);
GSeekType type);
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,

View File

@ -408,8 +408,9 @@ 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) G_GNUC_DEPRECATED_FOR(g_source_get_time);
GTimeVal *timeval);
#endif
gint64 g_source_get_time (GSource *source);

View File

@ -44,7 +44,8 @@ GMappedFile *g_mapped_file_ref (GMappedFile *file);
void g_mapped_file_unref (GMappedFile *file);
#ifndef G_DISABLE_DEPRECATED
void g_mapped_file_free (GMappedFile *file) G_GNUC_DEPRECATED_FOR(g_mapped_file_unref);
GLIB_DEPRECATED_FOR(g_mapped_file_unref)
void g_mapped_file_free (GMappedFile *file);
#endif
G_END_DECLS

View File

@ -174,13 +174,18 @@ gchar* g_ascii_strup (const gchar *str,
* toupper, which is almost never the right thing.
*/
GLIB_DEPRECATED
gint g_strcasecmp (const gchar *s1,
const gchar *s2) G_GNUC_DEPRECATED;
const gchar *s2);
GLIB_DEPRECATED
gint g_strncasecmp (const gchar *s1,
const gchar *s2,
guint n) G_GNUC_DEPRECATED;
gchar* g_strdown (gchar *string) G_GNUC_DEPRECATED;
gchar* g_strup (gchar *string) G_GNUC_DEPRECATED;
guint n);
GLIB_DEPRECATED
gchar* g_strdown (gchar *string);
GLIB_DEPRECATED
gchar* g_strup (gchar *string);
#endif /* G_DISABLE_DEPRECATED */

View File

@ -142,8 +142,10 @@ g_string_append_c_inline (GString *gstring,
#ifndef G_DISABLE_DEPRECATED
GString *g_string_down (GString *string) G_GNUC_DEPRECATED;
GString *g_string_up (GString *string) G_GNUC_DEPRECATED;
GLIB_DEPRECATED
GString *g_string_down (GString *string);
GLIB_DEPRECATED
GString *g_string_up (GString *string);
#define g_string_sprintf g_string_printf
#define g_string_sprintfa g_string_append_printf

View File

@ -74,10 +74,11 @@ void g_tree_foreach (GTree *tree,
gpointer user_data);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED
void g_tree_traverse (GTree *tree,
GTraverseFunc traverse_func,
GTraverseType traverse_type,
gpointer user_data) G_GNUC_DEPRECATED;
gpointer user_data);
#endif /* G_DISABLE_DEPRECATED */
gpointer g_tree_search (GTree *tree,

View File

@ -568,8 +568,9 @@ void g_unicode_canonical_ordering (gunichar *string,
#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 G_GNUC_DEPRECATED;
gsize *result_len) G_GNUC_MALLOC;
#endif
/* Array of skip-bytes-per-initial character.

View File

@ -234,7 +234,8 @@ const gchar * g_path_skip_root (const gchar *file_name);
#ifndef G_DISABLE_DEPRECATED
const gchar * g_basename (const gchar *file_name) G_GNUC_DEPRECATED_FOR(g_path_get_basename);
GLIB_DEPRECATED_FOR(g_path_get_basename)
const gchar * g_basename (const gchar *file_name);
#define g_dirname g_path_get_dirname
#endif /* G_DISABLE_DEPRECATED */

View File

@ -79,8 +79,9 @@ void g_value_set_static_boxed (GValue *value,
void g_value_take_boxed (GValue *value,
gconstpointer v_boxed);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_value_take_boxed)
void g_value_set_boxed_take_ownership (GValue *value,
gconstpointer v_boxed) G_GNUC_DEPRECATED_FOR(g_value_take_boxed);
gconstpointer v_boxed);
#endif
gpointer g_value_get_boxed (const GValue *value);
gpointer g_value_dup_boxed (const GValue *value);

View File

@ -527,8 +527,9 @@ void g_object_run_dispose (GObject *object);
void g_value_take_object (GValue *value,
gpointer v_object);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_value_take_object)
void g_value_set_object_take_ownership (GValue *value,
gpointer v_object) G_GNUC_DEPRECATED_FOR(g_value_take_object);
gpointer v_object);
#endif
#if !defined(G_DISABLE_DEPRECATED) || defined(GTK_COMPILATION)

View File

@ -313,8 +313,9 @@ GParamSpec* g_value_dup_param (const GValue *value);
void g_value_take_param (GValue *value,
GParamSpec *param);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_value_take_param)
void g_value_set_param_take_ownership (GValue *value,
GParamSpec *param) G_GNUC_DEPRECATED_FOR(g_value_take_param);
GParamSpec *param);
#endif
/* --- convenience functions --- */

View File

@ -178,9 +178,10 @@ G_BEGIN_DECLS
/* --- prototypes --- */
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED
void g_value_set_char (GValue *value,
gchar v_char) G_GNUC_DEPRECATED;
gchar g_value_get_char (const GValue *value) G_GNUC_DEPRECATED;
gchar v_char);
GLIB_DEPRECATED gchar g_value_get_char (const GValue *value);
#endif
void g_value_set_schar (GValue *value,
gint8 v_char);
@ -246,8 +247,9 @@ gchar* g_strdup_value_contents (const GValue *value);
void g_value_take_string (GValue *value,
gchar *v_string);
#ifndef G_DISABLE_DEPRECATED
GLIB_DEPRECATED_FOR(g_value_take_string)
void g_value_set_string_take_ownership (GValue *value,
gchar *v_string) G_GNUC_DEPRECATED_FOR(g_value_take_string);
gchar *v_string);
#endif