diff options
author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2022-02-17 00:05:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 17:05:14 -0600 |
commit | 1168868df63678e5704acd866fafcf40dc849481 (patch) | |
tree | 9373324c698c823ed65861845695e5dc524a95ae | |
parent | b1f12bee2c9542ebf4431f133f583a51a75371ec (diff) | |
download | numpy-1168868df63678e5704acd866fafcf40dc849481.tar.gz |
BUG: Replace ``ssize_t`` with ``size_t`` in tokenize.cpp (#21074)
Closes #21073
`ssize_t` is not defined for all platforms in C++ (e.g. windows), so replace it with `size_t` (which is OK here because the difference is always >=1).
-rw-r--r-- | numpy/core/src/multiarray/textreading/tokenize.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/textreading/tokenize.cpp b/numpy/core/src/multiarray/textreading/tokenize.cpp index 7cd3889cc..b6d9f882b 100644 --- a/numpy/core/src/multiarray/textreading/tokenize.cpp +++ b/numpy/core/src/multiarray/textreading/tokenize.cpp @@ -389,8 +389,8 @@ tokenize(stream *s, tokenizer_state *ts, parser_config *const config) */ if (ts->num_fields == 1 || ts->unquoted_state == TOKENIZE_UNQUOTED_WHITESPACE) { - ssize_t offset_last = ts->fields[ts->num_fields-1].offset; - ssize_t end_last = ts->fields[ts->num_fields].offset; + size_t offset_last = ts->fields[ts->num_fields-1].offset; + size_t end_last = ts->fields[ts->num_fields].offset; if (!ts->fields->quoted && end_last - offset_last == 1) { ts->num_fields--; } |