mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 06:20:28 +01:00
shared: add nm_g_slice_free() helper
How odd that such a macro does not exist yet. It seems like the majorities of calls to g_slice_free() could be replaced by this.
This commit is contained in:
parent
9dfc3ff5af
commit
dcdbe98406
1 changed files with 5 additions and 0 deletions
|
|
@ -1569,6 +1569,11 @@ nm_strcmp_p (gconstpointer a, gconstpointer b)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define nm_g_slice_free(ptr) \
|
||||
g_slice_free (typeof (*(ptr)), ptr)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* like g_memdup(). The difference is that the @size argument is of type
|
||||
* gsize, while g_memdup() has type guint. Since, the size of container types
|
||||
* like GArray is guint as well, this means trying to g_memdup() an
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue