3
3
4
4
from libc.stdio cimport fopen, fclose
5
5
from libc.stdlib cimport malloc, free
6
- from libc.string cimport strncpy, strlen, strcmp
6
+ from libc.string cimport strncpy, strlen, strcmp, strcasecmp
7
7
cimport libc.stdio as stdio
8
8
9
9
from cpython cimport (PyObject, PyBytes_FromString,
@@ -1399,9 +1399,9 @@ cdef _try_double(parser_t *parser, int col, int line_start, int line_end,
1399
1399
else :
1400
1400
error = to_double(word, data, parser.sci, parser.decimal)
1401
1401
if error != 1 :
1402
- if strcmp (word, cinf) == 0 :
1402
+ if strcasecmp (word, cinf) == 0 :
1403
1403
data[0 ] = INF
1404
- elif strcmp (word, cneginf) == 0 :
1404
+ elif strcasecmp (word, cneginf) == 0 :
1405
1405
data[0 ] = NEGINF
1406
1406
else :
1407
1407
return None , None
@@ -1415,9 +1415,9 @@ cdef _try_double(parser_t *parser, int col, int line_start, int line_end,
1415
1415
word = COLITER_NEXT(it)
1416
1416
error = to_double(word, data, parser.sci, parser.decimal)
1417
1417
if error != 1 :
1418
- if strcmp (word, cinf) == 0 :
1418
+ if strcasecmp (word, cinf) == 0 :
1419
1419
data[0 ] = INF
1420
- elif strcmp (word, cneginf) == 0 :
1420
+ elif strcasecmp (word, cneginf) == 0 :
1421
1421
data[0 ] = NEGINF
1422
1422
else :
1423
1423
return None , None
0 commit comments