Skip to content

Commit

Permalink
refactor: rename ada_get_host_type
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Aug 28, 2023
1 parent aeaec10 commit eddcf3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/ada_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ada_string ada_get_hostname(ada_url result);
ada_string ada_get_pathname(ada_url result);
ada_string ada_get_search(ada_url result);
ada_string ada_get_protocol(ada_url result);
uint8_t ada_get_url_host_type(ada_url result);
uint8_t ada_get_host_type(ada_url result);

// url_aggregator setters
// if ada_is_valid(result)) is false, the setters have no effect
Expand Down
2 changes: 1 addition & 1 deletion src/ada_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ ada_string ada_get_protocol(ada_url result) noexcept {
return ada_string_create(out.data(), out.length());
}

uint8_t ada_get_url_host_type(ada_url result) noexcept {
uint8_t ada_get_host_type(ada_url result) noexcept {
ada::result<ada::url_aggregator>& r = get_instance(result);
if (!r) {
return 0;
Expand Down
2 changes: 1 addition & 1 deletion tests/ada_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TEST(ada_c, setters) {
ada_set_protocol(url, "wss", 3);
ASSERT_EQ(convert_string(ada_get_protocol(url)), "wss:");

ASSERT_EQ(ada_get_url_host_type(url), 0);
ASSERT_EQ(ada_get_host_type(url), 0);

ada_free(url);

Expand Down

0 comments on commit eddcf3a

Please sign in to comment.