Skip to content

Commit e4dfd19

Browse files
committed
Revert printf format strings; fix more comment alignment
1 parent 3171674 commit e4dfd19

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: pandas/_libs/parsers.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ cdef extern from "parser/tokenizer.h":
122122
io_cleanup cb_cleanup
123123

124124
int64_t chunksize # Number of bytes to prepare for each chunk
125-
char *data # pointer to data to be processed
125+
char *data # pointer to data to be processed
126126
int64_t datalen # amount of data available
127127
int64_t datapos
128128

Diff for: pandas/_libs/src/parser/tokenizer.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ static int end_line(parser_t *self) {
468468
if (self->error_bad_lines) {
469469
self->error_msg = (char *)malloc(bufsize);
470470
snprintf(self->error_msg, bufsize,
471-
"Expected %d fields in line %zu, saw %d\n",
471+
"Expected %d fields in line %d, saw %d\n",
472472
ex_fields, self->file_lines, fields);
473473

474474
TRACE(("Error at line %d, %d fields\n", self->file_lines, fields));
@@ -480,7 +480,7 @@ static int end_line(parser_t *self) {
480480
// pass up error message
481481
msg = (char *)malloc(bufsize);
482482
snprintf(msg, bufsize,
483-
"Skipping line %zu: expected %d fields, saw %d\n",
483+
"Skipping line %d: expected %d fields, saw %d\n",
484484
self->file_lines, ex_fields, fields);
485485
append_warning(self, msg);
486486
free(msg);
@@ -1147,7 +1147,7 @@ static int parser_handle_eof(parser_t *self) {
11471147
case IN_QUOTED_FIELD:
11481148
self->error_msg = (char *)malloc(bufsize);
11491149
snprintf(self->error_msg, bufsize,
1150-
"EOF inside string starting at line %zu", self->file_lines);
1150+
"EOF inside string starting at line %d", self->file_lines);
11511151
return -1;
11521152

11531153
case ESCAPED_CHAR:
@@ -1323,7 +1323,7 @@ void debug_print_parser(parser_t *self) {
13231323
char *token;
13241324

13251325
for (line = 0; line < self->lines; ++line) {
1326-
printf("(Parsed) Line %zu: ", line);
1326+
printf("(Parsed) Line %d: ", line);
13271327

13281328
for (j = 0; j < self->line_fields[j]; ++j) {
13291329
token = self->words[j + self->line_start[line]];

0 commit comments

Comments
 (0)