DilloURL has a dtor.

It is the same as the original free function.  But this
will let me put some ownership on various members and slowly
start to C++ify this core type.
This commit is contained in:
2025-04-12 04:08:14 -04:00
parent 07485c7959
commit 441a04609b
21 changed files with 84 additions and 85 deletions

View File

@ -87,7 +87,7 @@ extern "C" {
#error URL header is now C++
#endif /* __cplusplus */
typedef struct {
struct DilloUrl {
Dstr *url_string;
const char *buffer;
const char *scheme; /**/
@ -102,11 +102,13 @@ typedef struct {
int ismap_url_len; /**< Used by server side image maps */
int illegal_chars; /**< number of illegal chars */
int illegal_chars_spc; /**< number of illegal space chars */
} DilloUrl;
~DilloUrl();
};
DilloUrl* a_Url_new(const char *url_str, const char *base_url);
void a_Url_free(DilloUrl *u);
char *a_Url_str(const DilloUrl *url);
const char *a_Url_hostname(const DilloUrl *u);
DilloUrl* a_Url_dup(const DilloUrl *u);