mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 20:40:06 +01:00
shared: add code comment to nm_clear_g_object()
This commit is contained in:
parent
02f4b0cbd5
commit
123765befc
1 changed files with 8 additions and 0 deletions
|
|
@ -1038,6 +1038,14 @@ nm_g_object_unref(gpointer obj)
|
|||
*/
|
||||
#define nm_clear_g_free(pp) nm_clear_pointer(pp, g_free)
|
||||
|
||||
/* Our nm_clear_pointer() is more typesafe than g_clear_pointer() and
|
||||
* should be preferred.
|
||||
*
|
||||
* For g_clear_object() that is not the case (because g_object_unref()
|
||||
* anyway takes a void pointer). So using g_clear_object() is fine.
|
||||
*
|
||||
* Still have a nm_clear_g_object() because that returns a boolean
|
||||
* indication whether anything was cleared. */
|
||||
#define nm_clear_g_object(pp) nm_clear_pointer(pp, g_object_unref)
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue