@jspahrsummers Hmm, I can't figure out a way in C to purely use macros with the comma operator and still be able to open a block to make a temporary variable (which I need to for the realloc result so it won't overwrite the old if the realloc fails).

I've come up with a hybrid solution that uses an inline function to do the array resizing and returns the pointer to the next allocated item, which enables the comma operator. I'm about to push that up here. If you can come up with a cleverer way to abuse the C preprocessor for this, I'd be happy to change it.