shared: fix typecheck in NM_PTRARRAY_LEN()
Previously, NM_PTRARRAY_LEN() would not work if the pointer type is an opaque type, which is common. For example: NMConnection *const*connections = ...;
This commit is contained in:
@@ -271,7 +271,8 @@ NM_G_ERROR_MSG (GError *error)
|
||||
gsize _n = 0; \
|
||||
\
|
||||
if (_array) { \
|
||||
_nm_unused typeof (*(_array[0])) *_array_check = _array[0]; \
|
||||
_nm_unused gconstpointer _type_check_is_pointer = _array[0]; \
|
||||
\
|
||||
while (_array[_n]) \
|
||||
_n++; \
|
||||
} \
|
||||
|
Reference in New Issue
Block a user