Skip to content

Commit 132e0cd

Browse files
committed
Fix compile error
1 parent c1c1b3b commit 132e0cd

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.18)
22
project(
33
libtokenizers
44
LANGUAGES C CXX
5-
VERSION 0.0.1
5+
VERSION 0.0.2
66
)
77

88
# Options

Changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
## 0.0.2
2+
+ Fixed compile error due to naming in `tokenizer::from_file` method.
3+
14
## 0.0.1
25
+ First pre-release.

include/tokenizers/cxx/tokenizer.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ namespace huggingface::tokenizers {
137137
static tokenizer from_file(const std::filesystem::path& path) {
138138
if (!std::filesystem::exists(path))
139139
throw std::runtime_error("Failed to create tokenizer because tokenizer file could not be found");
140-
hft_tokenizer* tokenizer = nullptr;
141-
hft_status status = hft_tokenizer_create_from_file(path.string().c_str(), &tokenizer);
140+
hft_tokenizer* tok = nullptr;
141+
hft_status status = hft_tokenizer_create_from_file(path.string().c_str(), &tok);
142142
if (status != HFT_OK)
143143
throw std::runtime_error("Failed to create tokenizer from file");
144-
return tokenizer(tokenizer);
144+
return tokenizer(tok);
145145
}
146146

147147
private:

0 commit comments

Comments
 (0)