Skip to content

Commit 9e92827

Browse files
authored
Fix build on latest AppleClang (#629)
* Fix build on latest AppleClang * Bump version to 4.5.1
1 parent c106644 commit 9e92827

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_policy(SET CMP0091 NEW)
33
set(CMAKE_FIND_NO_INSTALL_PREFIX TRUE FORCE)
44
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
55

6-
project(treelite LANGUAGES CXX C VERSION 4.5.0)
6+
project(treelite LANGUAGES CXX C VERSION 4.5.1)
77
if(POLICY CMP0135)
88
cmake_policy(SET CMP0135 NEW)
99
endif()

include/treelite/c_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ TREELITE_DLL int TreeliteLoadXGBoostModelUBJSON(
139139
* \return 0 for success, -1 for failure
140140
*/
141141
TREELITE_DLL int TreeliteLoadXGBoostModelFromUBJSONString(
142-
uint8_t const* ubjson_str, size_t length, char const* config_json, TreeliteModelHandle* out);
142+
char const* ubjson_str, size_t length, char const* config_json, TreeliteModelHandle* out);
143143
/*!
144144
* \brief Inspect the first few bytes of an XGBoost model and heuristically determine whether
145145
* it's using the JSON or UBJSON format.

include/treelite/model_loader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ std::unique_ptr<treelite::Model> LoadXGBoostModelUBJSON(
7272
* \return Loaded model
7373
*/
7474
std::unique_ptr<treelite::Model> LoadXGBoostModelFromUBJSONString(
75-
std::basic_string_view<std::uint8_t> ubjson_str, std::string const& config_json);
75+
std::string_view ubjson_str, std::string const& config_json);
7676

7777
/*!
7878
* \brief Inspect the first few bytes of an XGBoost model and heuristically determine whether

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "packager.pep517"
77

88
[project]
99
name = "treelite"
10-
version = "4.5.0"
10+
version = "4.5.1"
1111
authors = [
1212
{name = "Hyunsu Cho", email = "chohyu01@cs.washington.edu"}
1313
]

python/treelite/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.5.0
1+
4.5.1

src/c_api/model_loader.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ int TreeliteLoadXGBoostModelUBJSON(
7878
API_END();
7979
}
8080

81-
int TreeliteLoadXGBoostModelFromUBJSONString(std::uint8_t const* ubjson_str, std::size_t length,
82-
char const* config_json, TreeliteModelHandle* out) {
81+
int TreeliteLoadXGBoostModelFromUBJSONString(
82+
char const* ubjson_str, std::size_t length, char const* config_json, TreeliteModelHandle* out) {
8383
API_BEGIN();
8484
std::unique_ptr<treelite::Model> model = treelite::model_loader::LoadXGBoostModelFromUBJSONString(
85-
std::basic_string_view<std::uint8_t>{ubjson_str, length}, config_json);
85+
std::string_view{ubjson_str, length}, config_json);
8686
*out = static_cast<TreeliteModelHandle>(model.release());
8787
API_END();
8888
}

src/model_loader/xgboost_ubjson.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ std::unique_ptr<treelite::Model> LoadXGBoostModelUBJSON(
3737
}
3838

3939
std::unique_ptr<treelite::Model> LoadXGBoostModelFromUBJSONString(
40-
std::basic_string_view<std::uint8_t> ubjson_str, std::string const& config_json) {
40+
std::string_view ubjson_str, std::string const& config_json) {
4141
nlohmann::json parsed_config = nlohmann::json::parse(config_json);
4242
return ParseStream(ubjson_str, parsed_config);
4343
}

0 commit comments

Comments
 (0)