Skip to content

Commit 0124cd5

Browse files
committed
changed macro to static const object
function-scope macros are discouraged as they are likely to be misleading to the reader. Macro definitions persist outside of the enclosing scope, static const objects do not.
1 parent 87cd640 commit 0124cd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ cat("1.0E300L\n};\n", file=f, append=TRUE)
683683
*/
684684
static void parse_double_regular_core(const char **pch, double *target)
685685
{
686-
#define FLOAT_MAX_DIGITS 18
686+
static const int_fast32_t FLOAT_MAX_DIGITS = 18;
687687
const char *ch = *pch;
688688

689689
if (*ch=='0' && args.keepLeadingZeros && IS_DIGIT(ch[1])) return;

0 commit comments

Comments
 (0)