Skip to content

Commit 3be1340

Browse files
committed
unbreak compilation: prevent name collision on pow10
1 parent c31580b commit 3be1340

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

quickjs-printf.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static int digits_count(uint32_t val) {
158158
}
159159

160160
/* Powers of 5 less than UINT32_MAX */
161-
static uint32_t const pow5[14] = {
161+
static uint32_t const pow5_table[14] = {
162162
1UL,
163163
5UL,
164164
5UL*5UL,
@@ -176,7 +176,7 @@ static uint32_t const pow5[14] = {
176176
};
177177

178178
/* Powers of 10 less than UINT32_MAX */
179-
static uint32_t const pow10[10] = {
179+
static uint32_t const pow10_table[10] = {
180180
1UL,
181181
10UL,
182182
100UL,
@@ -266,7 +266,7 @@ static int js_format_f(double value, char dest[minimum_length(2+1074+1)],
266266
plen = comp10_init(digits, mant);
267267
for (exp = -exp2; exp > 0;) {
268268
int k = exp >= 13 ? 13 : exp;
269-
plen = comp10_multiply(digits, plen, pow5[k]);
269+
plen = comp10_multiply(digits, plen, pow5_table[k]);
270270
exp -= k;
271271
}
272272
}
@@ -309,7 +309,7 @@ static int js_format_f(double value, char dest[minimum_length(2+1074+1)],
309309
trail |= digits[start++];
310310
trunc -= COMP10_LEN;
311311
}
312-
inc = pow10[trunc]; // trunc is in range 1..COMP10_LEN
312+
inc = pow10_table[trunc]; // trunc is in range 1..COMP10_LEN
313313
half = inc / 2;
314314
low = digits[start] % inc;
315315
// round to nearest, tie to even

0 commit comments

Comments
 (0)