GREEDY_REALLOC_APPEND: Make more type safe
authorAdrian Vovk <adrianvovk@gmail.com>
Wed, 4 Sep 2024 17:44:26 +0000 (13:44 -0400)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 18 Oct 2024 05:22:58 +0000 (14:22 +0900)
commitfafc3c2d5c7fae6bad0f6dc51611ae9390589ade
tree9d582f98ad89741324109494bf37a93550182fad
parent49fd31df58a707e7d748581a6986164132460cf2
GREEDY_REALLOC_APPEND: Make more type safe

Previously, GREEDY_REALLOC_APPEND would compile perfectly fine and cause
subtle memory corruption if the caller messes up the type they're passing
in (i.e. by forgetting to pass-by-reference when appending a Type* to an
array of Type*). Now this will lead to compilation failure
src/basic/alloc-util.h