More ownership work.

This commit is contained in:
2025-04-16 02:41:33 -04:00
parent d001d2609b
commit 5f222e30b8
7 changed files with 43 additions and 29 deletions

View File

@ -112,6 +112,8 @@ struct DilloUrl {
int illegal_chars_spc; /**< number of illegal space chars */
~DilloUrl();
friend bool operator == ( const DilloUrl &lhs, const DilloUrl &rhs );
};
@ -121,6 +123,12 @@ char *a_Url_str(const DilloUrl *url);
const char *a_Url_hostname(const DilloUrl *u);
std::unique_ptr< DilloUrl > a_Url_dup(const DilloUrl *u);
int a_Url_cmp(const DilloUrl *A, const DilloUrl *B);
inline bool
operator == ( const DilloUrl &lhs, const DilloUrl &rhs )
{
return a_Url_cmp( &lhs, &rhs ) == 0;
}
void a_Url_set_flags(DilloUrl *u, int flags);
void a_Url_set_data(DilloUrl *u, std::string_view data);
void a_Url_set_ismap_coords(DilloUrl *u, char *coord_str);