bc: add comment about BC_NUM_DEF_SIZE

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2018-12-06 12:34:39 +01:00
parent 1ff8862149
commit 2fa11b6d35

View File

@ -205,9 +205,6 @@ typedef struct BcVec {
BcVecFree dtor;
} BcVec;
#define bc_vec_pop(v) (bc_vec_npop((v), 1))
#define bc_vec_top(v) (bc_vec_item_rev((v), 0))
typedef signed char BcDig;
typedef struct BcNum {
@ -220,6 +217,7 @@ typedef struct BcNum {
#define BC_NUM_MIN_BASE ((unsigned long) 2)
#define BC_NUM_MAX_IBASE ((unsigned long) 16)
// larger value might speed up BIGNUM calculations a bit:
#define BC_NUM_DEF_SIZE (16)
#define BC_NUM_PRINT_WIDTH (69)
@ -1078,6 +1076,9 @@ static void bc_vec_expand(BcVec *v, size_t req)
}
}
#define bc_vec_pop(v) (bc_vec_npop((v), 1))
#define bc_vec_top(v) (bc_vec_item_rev((v), 0))
static void bc_vec_npop(BcVec *v, size_t n)
{
if (!v->dtor)