mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-31 06:20:31 +01:00
glib-aux: prevent usage of g_source_remove*() API
Searching over all sources in order to remove them is not what we want to do. If you think you need these functions, instead keep track of the GSource instances yourself.
This commit is contained in:
parent
752db4904d
commit
0389a4786c
1 changed files with 13 additions and 3 deletions
|
|
@ -684,11 +684,21 @@ g_hash_table_steal_extended(GHashTable * hash_table,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
_nm_deprecated("Don't use g_cancellable_reset(). Create a new cancellable "
|
||||
"instead.") void _nm_g_cancellable_reset(GCancellable *cancellable);
|
||||
_nm_deprecated("Don't use this API") void _nm_forbidden_glib_api_0(void);
|
||||
_nm_deprecated("Don't use this API") void _nm_forbidden_glib_api_n(gconstpointer arg0, ...);
|
||||
|
||||
#undef g_cancellable_reset
|
||||
#define g_cancellable_reset(cancellable) _nm_g_cancellable_reset(cancellable)
|
||||
#define g_cancellable_reset(cancellable) _nm_forbidden_glib_api_n(cancellable)
|
||||
|
||||
#undef g_idle_remove_by_data
|
||||
#define g_idle_remove_by_data(data) _nm_forbidden_glib_api_n(data)
|
||||
|
||||
#undef g_source_remove_by_funcs_user_data
|
||||
#define g_source_remove_by_funcs_user_data(funcs, user_data) \
|
||||
_nm_forbidden_glib_api_n(funcs, user_data)
|
||||
|
||||
#undef g_source_remove_by_user_data
|
||||
#define g_source_remove_by_user_data(user_data) _nm_forbidden_glib_api_n(user_data)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue