@@ -716,11 +716,10 @@ cdef class TextReader:
716
716
# header is now a list of lists, so field_count should use header[0]
717
717
718
718
cdef:
719
- size_t i, start, data_line, field_count, passed_count, hr , unnamed_count # noqa
719
+ Py_ssize_t i, start, field_count, passed_count, unnamed_count # noqa
720
720
char * word
721
721
object name
722
- int status
723
- Py_ssize_t size
722
+ int status, hr, data_line
724
723
char * errors = " strict"
725
724
cdef StringPath path = _string_path(self .c_encoding)
726
725
@@ -1416,8 +1415,7 @@ cdef _string_box_factorize(parser_t *parser, int col,
1416
1415
bint na_filter, kh_str_t * na_hashset):
1417
1416
cdef:
1418
1417
int error, na_count = 0
1419
- Py_ssize_t i
1420
- size_t lines
1418
+ Py_ssize_t i, lines
1421
1419
coliter_t it
1422
1420
const char * word = NULL
1423
1421
ndarray[object ] result
@@ -1470,8 +1468,7 @@ cdef _string_box_utf8(parser_t *parser, int col,
1470
1468
bint na_filter, kh_str_t * na_hashset):
1471
1469
cdef:
1472
1470
int error, na_count = 0
1473
- Py_ssize_t i
1474
- size_t lines
1471
+ Py_ssize_t i, lines
1475
1472
coliter_t it
1476
1473
const char * word = NULL
1477
1474
ndarray[object ] result
@@ -1525,8 +1522,7 @@ cdef _string_box_decode(parser_t *parser, int col,
1525
1522
char * encoding):
1526
1523
cdef:
1527
1524
int error, na_count = 0
1528
- Py_ssize_t i, size
1529
- size_t lines
1525
+ Py_ssize_t i, size, lines
1530
1526
coliter_t it
1531
1527
const char * word = NULL
1532
1528
ndarray[object ] result
@@ -1586,8 +1582,7 @@ cdef _categorical_convert(parser_t *parser, int col,
1586
1582
" Convert column data into codes, categories"
1587
1583
cdef:
1588
1584
int error, na_count = 0
1589
- Py_ssize_t i, size
1590
- size_t lines
1585
+ Py_ssize_t i, size, lines
1591
1586
coliter_t it
1592
1587
const char * word = NULL
1593
1588
@@ -1691,7 +1686,7 @@ cdef _try_double(parser_t *parser, int col, int line_start, int line_end,
1691
1686
bint na_filter, kh_str_t * na_hashset, object na_flist):
1692
1687
cdef:
1693
1688
int error, na_count = 0
1694
- size_t i, lines
1689
+ Py_ssize_t i, lines
1695
1690
coliter_t it
1696
1691
const char * word = NULL
1697
1692
char * p_end
@@ -1738,8 +1733,7 @@ cdef inline int _try_double_nogil(parser_t *parser,
1738
1733
int * na_count) nogil:
1739
1734
cdef:
1740
1735
int error,
1741
- size_t i
1742
- size_t lines = line_end - line_start
1736
+ Py_ssize_t i, lines = line_end - line_start
1743
1737
coliter_t it
1744
1738
const char * word = NULL
1745
1739
char * p_end
@@ -1801,7 +1795,7 @@ cdef _try_uint64(parser_t *parser, int col, int line_start, int line_end,
1801
1795
bint na_filter, kh_str_t * na_hashset):
1802
1796
cdef:
1803
1797
int error
1804
- size_t i, lines
1798
+ Py_ssize_t i, lines
1805
1799
coliter_t it
1806
1800
uint64_t * data
1807
1801
ndarray result
@@ -1837,8 +1831,7 @@ cdef inline int _try_uint64_nogil(parser_t *parser, int col, int line_start,
1837
1831
uint64_t * data, uint_state * state) nogil:
1838
1832
cdef:
1839
1833
int error
1840
- size_t i
1841
- size_t lines = line_end - line_start
1834
+ Py_ssize_t i, lines = line_end - line_start
1842
1835
coliter_t it
1843
1836
const char * word = NULL
1844
1837
khiter_t k
@@ -1873,7 +1866,7 @@ cdef _try_int64(parser_t *parser, int col, int line_start, int line_end,
1873
1866
bint na_filter, kh_str_t * na_hashset):
1874
1867
cdef:
1875
1868
int error, na_count = 0
1876
- size_t i, lines
1869
+ Py_ssize_t i, lines
1877
1870
coliter_t it
1878
1871
int64_t * data
1879
1872
ndarray result
@@ -1902,8 +1895,7 @@ cdef inline int _try_int64_nogil(parser_t *parser, int col, int line_start,
1902
1895
int64_t * data, int * na_count) nogil:
1903
1896
cdef:
1904
1897
int error
1905
- size_t i
1906
- size_t lines = line_end - line_start
1898
+ Py_ssize_t i, lines = line_end - line_start
1907
1899
coliter_t it
1908
1900
const char * word = NULL
1909
1901
khiter_t k
@@ -1939,7 +1931,7 @@ cdef _try_bool(parser_t *parser, int col, int line_start, int line_end,
1939
1931
bint na_filter, kh_str_t * na_hashset):
1940
1932
cdef:
1941
1933
int na_count
1942
- size_t lines = line_end - line_start
1934
+ Py_ssize_t lines = line_end - line_start
1943
1935
uint8_t * data
1944
1936
cnp.ndarray[cnp.uint8_t, ndim= 1 ] result
1945
1937
@@ -1963,8 +1955,7 @@ cdef inline int _try_bool_nogil(parser_t *parser, int col, int line_start,
1963
1955
uint8_t * data, int * na_count) nogil:
1964
1956
cdef:
1965
1957
int error
1966
- size_t lines = line_end - line_start
1967
- size_t i
1958
+ Py_ssize_t i, lines = line_end - line_start
1968
1959
coliter_t it
1969
1960
const char * word = NULL
1970
1961
khiter_t k
@@ -2004,7 +1995,7 @@ cdef _try_bool_flex(parser_t *parser, int col, int line_start, int line_end,
2004
1995
const kh_str_t * false_hashset):
2005
1996
cdef:
2006
1997
int error, na_count = 0
2007
- size_t i, lines
1998
+ Py_ssize_t i, lines
2008
1999
coliter_t it
2009
2000
const char * word = NULL
2010
2001
uint8_t * data
@@ -2033,8 +2024,7 @@ cdef inline int _try_bool_flex_nogil(parser_t *parser, int col, int line_start,
2033
2024
int * na_count) nogil:
2034
2025
cdef:
2035
2026
int error = 0
2036
- size_t i
2037
- size_t lines = line_end - line_start
2027
+ Py_ssize_t i, lines = line_end - line_start
2038
2028
coliter_t it
2039
2029
const char * word = NULL
2040
2030
khiter_t k
@@ -2249,8 +2239,7 @@ cdef _apply_converter(object f, parser_t *parser, int col,
2249
2239
char * c_encoding):
2250
2240
cdef:
2251
2241
int error
2252
- Py_ssize_t i
2253
- size_t lines
2242
+ Py_ssize_t i, lines
2254
2243
coliter_t it
2255
2244
const char * word = NULL
2256
2245
char * errors = " strict"
@@ -2341,7 +2330,7 @@ def _to_structured_array(dict columns, object names, object usecols):
2341
2330
cdef _fill_structured_column(char * dst, char * src, int elsize,
2342
2331
int stride, int length, bint incref):
2343
2332
cdef:
2344
- size_t i
2333
+ Py_ssize_t i
2345
2334
2346
2335
if incref:
2347
2336
util.transfer_object_column(dst, src, stride, length)
0 commit comments