Plumbing ownership further; some things became C++

This commit is contained in:
2025-04-14 03:48:28 -04:00
parent 76bae93e1c
commit d4a69c0b11
30 changed files with 192 additions and 193 deletions

View File

@ -58,8 +58,8 @@ extern "C++"
#define URL_PATH_(u) (u)->path
#define URL_QUERY_(u) (u)->query
#define URL_FRAGMENT_(u) (u)->fragment
#define URL_HOST_(u) a_Url_hostname(*(u))
#define URL_STR_(u) a_Url_str(*(u))
#define URL_HOST_(u) a_Url_hostname((u))
#define URL_STR_(u) a_Url_str((u))
/* this returns a Dstr* */
#define URL_DATA_(u) (u)->data
/* these return an integer */
@ -117,13 +117,12 @@ struct DilloUrl {
std::unique_ptr< DilloUrl > a_Url_new(const char *url_str, const char *base_url);
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 int a_Url_cmp_c( const DilloUrl *const A, const DilloUrl *const B ) { return a_Url_cmp( *A, *B ); }
void a_Url_set_flags(DilloUrl &u, int flags);
void a_Url_set_data(DilloUrl &u, std::string_view data);
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);
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);
char *a_Url_decode_hex_str(const char *str);
char *a_Url_encode_hex_str(const char *str);