mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-12 20:30:34 +01:00
shared: add nm_hash_update_valp() helper macro
Add a macro for hashing that takes a pointer and the size is automatically determined by sizeof(*p).
This commit is contained in:
parent
014d6a2c78
commit
0fdfe89f45
1 changed files with 3 additions and 0 deletions
|
|
@ -122,6 +122,9 @@ nm_hash_update (NMHashState *state, const void *ptr, gsize n)
|
|||
nm_hash_update ((state), &_val, sizeof (_val)); \
|
||||
} G_STMT_END
|
||||
|
||||
#define nm_hash_update_valp(state, val) \
|
||||
nm_hash_update ((state), (val), sizeof (*(val))) \
|
||||
|
||||
static inline void
|
||||
nm_hash_update_bool (NMHashState *state, bool val)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue