Rewrite the computation of the size of the array to be more flexible.
This commit is contained in:
1 parent
a8c8d2d34f
commit
fdd7f9d19d
1 file changed
+2
-1
@@ -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) \
|
||||
|
||||
Reference in new issue
Block a user