Skip to content

Commit

Permalink
fixup! Add ada_c API for url search params
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Oct 9, 2023
1 parent 00f0c10 commit 333041e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ada_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ ada_string ada_search_params_keys_iter_next(
(ada::result<ada::url_search_params_keys_iter>*)result;
auto next = (*r)->next();
if (!next.has_value()) return ada_string_create(NULL, 0);
return ada_string_create(next->c_str(), next->length());
return ada_string_create(next->data(), next->length());
}

bool ada_search_params_keys_iter_is_done(
Expand All @@ -643,7 +643,7 @@ ada_string ada_search_params_values_iter_next(
(ada::result<ada::url_search_params_values_iter>*)result;
auto next = (*r)->next();
if (!next.has_value()) return ada_string_create(NULL, 0);
return ada_string_create(next->c_str(), next->length());
return ada_string_create(next->data(), next->length());
}

bool ada_search_params_values_iter_is_done(
Expand All @@ -668,8 +668,8 @@ ada_string_pair ada_search_params_entries_iter_next(
if (!next.has_value())
return {ada_string_create(NULL, 0), ada_string_create(NULL, 0)};
return ada_string_pair{
ada_string_create(next->first.c_str(), next->first.length()),
ada_string_create(next->second.c_str(), next->second.length())};
ada_string_create(next->first.data(), next->first.length()),
ada_string_create(next->second.data(), next->second.length())};
}

bool ada_search_params_entries_iter_is_done(
Expand Down

0 comments on commit 333041e

Please sign in to comment.