Skip to content

Commit 42c509c

Browse files
committed
Just define the endptr and endpc
1 parent 66f8be5 commit 42c509c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/_libs/src/parser/tokenizer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,13 +1816,13 @@ double round_trip(const char *p, char **q, char decimal, char sci, char tsep,
18161816
int skip_trailing, int *error, int *maybe_int) {
18171817
// 'normalize' representation to C-locale; replace decimal with '.' and
18181818
// remove t(housand)sep.
1819-
char *endptr = NULL;
1819+
char *endptr;
18201820
char *pc = _str_copy_decimal_str_c(p, &endptr, decimal, tsep);
18211821
// This is called from a nogil block in parsers.pyx
18221822
// so need to explicitly get GIL before Python calls
18231823
PyGILState_STATE gstate;
18241824
gstate = PyGILState_Ensure();
1825-
char *endpc = NULL;
1825+
char *endpc;
18261826
double r = PyOS_string_to_double(pc, &endpc, 0);
18271827
// PyOS_string_to_double needs to consume the whole string
18281828
if (endpc == pc + strlen(pc)) {

0 commit comments

Comments
 (0)