simplified Autoarr/Hashtable _foreach

This commit is contained in:
2023-05-20 01:40:16 +06:00
parent d7136055d9
commit 461aef3a00
19 changed files with 78 additions and 71 deletions

View File

@@ -50,11 +50,11 @@ void __Autoarr_##type##_freeWithoutMembers(Autoarr_##type* ar, bool freePtr){ \
\
void __Autoarr_##type##_freeWithMembers(Autoarr_##type* ar, bool freePtr){ \
if(ktDescriptor_##type.freeMembers!=NULL) { \
Autoarr_foreach(ar, el, ({ \
Autoarr_foreach(ar, el, \
void* members_ptr=⪙ \
if(TYPE_IS_PTR) members_ptr=*(type**)members_ptr; \
ktDescriptor_##type.freeMembers(members_ptr); \
})); \
); \
} \
__Autoarr_##type##_freeWithoutMembers(ar, freePtr);\
} \