Skip to content

Commit 8b4cf06

Browse files
committed
feat(io): expose io_read_csv
1 parent 4174903 commit 8b4cf06

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

core/io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ obj_p parse_csv_range(i8_t types[], i64_t num_types, str_p buf, i64_t size, i64_
460460
return NULL_OBJ; // Success
461461
}
462462

463-
obj_p parse_csv_lines(i8_t *types, i64_t num_types, str_p buf, i64_t size, i64_t total_lines, obj_p cols, c8_t sep) {
463+
obj_p io_read_csv(i8_t *types, i64_t num_types, str_p buf, i64_t size, i64_t total_lines, obj_p cols, c8_t sep) {
464464
obj_p err, res = NULL_OBJ;
465465
i64_t i, l, batch_size, num_batches, lines_per_batch, start_line, end_line, lines_in_batch;
466466
str_p batch_start, batch_end;
@@ -708,7 +708,7 @@ obj_p ray_read_csv(obj_p *x, i64_t n) {
708708
}
709709

710710
// parse lines
711-
res = parse_csv_lines((i8_t *)AS_U8(types), l, line, size, lines, cols, sep);
711+
res = io_read_csv((i8_t *)AS_U8(types), l, line, size, lines, cols, sep);
712712

713713
drop_obj(types);
714714
fs_fclose(fd);

core/io.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ obj_p io_get_symfile(obj_p path);
4040
obj_p io_set_table(obj_p path, obj_p table);
4141
obj_p io_set_table_splayed(obj_p path, obj_p table, obj_p symfile);
4242
obj_p io_get_table_splayed(obj_p path, obj_p symfile);
43+
obj_p io_read_csv(i8_t *types, i64_t num_types, str_p buf, i64_t size, i64_t total_lines, obj_p cols, c8_t sep);
4344

4445
#endif // IO_H

0 commit comments

Comments
 (0)