Rewrite the computation of the size of the array to be more flexible.

This commit is contained in:
Patrick Pelissier committed 2017-03-23 21:39:44 +01:00
1 parent a8c8d2d34f
commit fdd7f9d19d
1 file changed
+2 -1
+2 -1
View File
@@ -84,7 +84,8 @@
)
// Compute alloc from the requested size.
#define ARRAYI_INC_ALLOC_SIZE(n) ((n) < 8 ? 16 : (n) * 2)
#define ARRAYI_EXPECTED_SIZE 8
#define ARRAYI_INC_ALLOC_SIZE(n) (M_MAX(ARRAYI_EXPECTED_SIZE, (n))*2)
// Internal definition.
#define ARRAYI_DEF2(name, type, oplist) \