Add lasso_is_in_list_of_strings macro to utils.h
Add macro that tests to see if a string is a member in a list of strings. Signed-off-by: John Dennis <jdennis@redhat.com> License: MIT
This commit is contained in:
parent
f3849b2664
commit
a6014fc51b
|
@ -442,6 +442,11 @@
|
|||
*__tmp_list = g_list_remove(*__tmp_list, __tmp); \
|
||||
lasso_unref(__tmp); } while(0)
|
||||
|
||||
/* List element membership */
|
||||
#define lasso_is_in_list_of_strings(list, item) \
|
||||
g_list_find_custom(list, item, (GCompareFunc)g_strcmp0) == NULL ? FALSE : TRUE
|
||||
|
||||
|
||||
/* Pointer ownership transfer */
|
||||
|
||||
/* lasso_transfer_xxx macros are like lasso_assign_xxx but they do not increment reference count or
|
||||
|
|
Loading…
Reference in New Issue