We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a1201f commit be08bd7Copy full SHA for be08bd7
src/binding.cpp
@@ -11,8 +11,11 @@ PYBIND11_MODULE(can_ada, m) {
11
m.attr("__version__") = "dev";
12
#endif
13
14
- m.def("can_parse", [](std::string_view input, std::optional<std::string_view*> base_input) {
15
- return ada::can_parse(input, base_input.value_or(nullptr));
+ m.def("can_parse", [](std::string_view input, std::optional<const std::string_view> base_input) {
+ if (base_input.has_value()) {
16
+ return ada::can_parse(input, &base_input.value());
17
+ }
18
+ return ada::can_parse(input);
19
}, py::arg("input"), py::arg("base_input") = py::none());
20
21
py::class_<ada::url_aggregator>(m, "URL")
0 commit comments