Skip to content

Commit

Permalink
Merge pull request #43 from red0124/bugfix/ftell_slowdown
Browse files Browse the repository at this point in the history
Remove usage of ftell when updating cursor position value
  • Loading branch information
red0124 authored Mar 2, 2024
2 parents 67ef665 + 7f53b58 commit f5b750d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.14)

project(
ssp
VERSION 1.7.1
VERSION 1.7.2
DESCRIPTION "csv parser"
HOMEPAGE_URL "https://github.com/red0124/ssp"
LANGUAGES CXX
Expand Down
2 changes: 1 addition & 1 deletion include/ss/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ std::tuple<ssize_t, bool> get_line(char*& buffer, size_t& buffer_size,
ssize_t ssize;
if (file) {
ssize = get_line_file(buffer, buffer_size, file);
curr_char = std::ftell(file);
curr_char += ssize;
} else {
ssize = get_line_buffer(buffer, buffer_size, csv_data_buffer,
csv_data_size, curr_char);
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project(
'cpp_std=c++17',
'buildtype=debugoptimized',
'wrap_mode=forcefallback'],
version: '1.7.1',
version: '1.7.2',
meson_version:'>=0.54.0')

fast_float_dep = dependency('fast_float')
Expand Down
2 changes: 1 addition & 1 deletion ssp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ std::tuple<ssize_t, bool> get_line(char*& buffer, size_t& buffer_size,
ssize_t ssize;
if (file) {
ssize = get_line_file(buffer, buffer_size, file);
curr_char = std::ftell(file);
curr_char += ssize;
} else {
ssize = get_line_buffer(buffer, buffer_size, csv_data_buffer,
csv_data_size, curr_char);
Expand Down

0 comments on commit f5b750d

Please sign in to comment.