On 20.02.23 23:16, Joel Jacobson wrote:
> In the new attached patch, Andres fixed buffer idea has been implemented
> throughout the entire numeric.c code base.
I think the definition of the "preinitialized constants" could be
adapted to this as well. For example, instead of
static const NumericDigit const_one_data[1] = {1};
static const NumericVar const_one =
{1, 0, NUMERIC_POS, 0, NULL, (NumericDigit *) const_one_data};
it could be something like
static const NumericVar const_one =
{0, 0, NUMERIC_POS, 0, NULL, NULL, 1, {1}};
Or perhaps with designators:
static const NumericVar const_one =
{.sign = NUMERIC_POS, .buflen = 1, .fixed_buf = {1}};