Skip to content

Commit 067bab1

Browse files
committed
restored overridden changes
1 parent dea68c1 commit 067bab1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/fread.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static double NAND;
9494
static double INFD;
9595

9696
// NAN and INFINITY constants are float, so cast to double once up front.
97-
static void init(void)
97+
static void init_const_literals(void)
9898
{
9999
NAND = (double)NAN;
100100
INFD = (double)INFINITY;
@@ -840,7 +840,7 @@ static void parse_double_regular(FieldParseContext *ctx)
840840
*/
841841
static void parse_double_extended(FieldParseContext *ctx)
842842
{
843-
init();
843+
init_const_literals();
844844

845845
double* target = ctx->targets[sizeof(double)];
846846
const char *ch = *ctx->ch;
@@ -927,7 +927,7 @@ static void parse_double_extended(FieldParseContext *ctx)
927927
*/
928928
static void parse_double_hexadecimal(FieldParseContext *ctx)
929929
{
930-
init();
930+
init_const_literals();
931931

932932
const char *ch = *ctx->ch;
933933
double *target = ctx->targets[sizeof(double)];
@@ -2166,9 +2166,8 @@ int freadMain(freadMainArgs _args)
21662166
DTPRINT(_(" Initial alloc = %"PRId64" rows (%"PRId64" + %d%%) using bytes/max(mean-2*sd,min) clamped between [1.1*estn, 2.0*estn]\n"),
21672167
allocnrow, estnrow, (int)(100.0 * allocnrow / estnrow - 100.0));
21682168
DTPRINT(" =====\n"); // # notranslate
2169-
} else {
2170-
if (sampleLines > allocnrow) INTERNAL_STOP("sampleLines(%"PRId64") > allocnrow(%"PRId64")", sampleLines, allocnrow); // # nocov
21712169
}
2170+
if (sampleLines > allocnrow) INTERNAL_STOP("sampleLines(%"PRId64") > allocnrow(%"PRId64")", sampleLines, allocnrow); // # nocov
21722171
}
21732172
if (nrowLimit < allocnrow) {
21742173
if (verbose) DTPRINT(_(" Alloc limited to lower nrows=%"PRId64" passed in.\n"), nrowLimit);
@@ -2376,8 +2375,10 @@ int freadMain(freadMainArgs _args)
23762375
.threadn = me,
23772376
.quoteRule = quoteRule,
23782377
.stopTeam = &stopTeam,
2378+
#ifndef DTPY
23792379
.nStringCols = nStringCols,
23802380
.nNonStringCols = nNonStringCols
2381+
#endif
23812382
};
23822383
if ((rowSize8 && !ctx.buff8) || (rowSize4 && !ctx.buff4) || (rowSize1 && !ctx.buff1)) {
23832384
stopTeam = true;

0 commit comments

Comments
 (0)