Use new/delete for another struct

This commit is contained in:
2025-07-30 11:09:16 -04:00
parent 39858a75b1
commit 4093da9640
2 changed files with 3 additions and 4 deletions

View File

@ -122,7 +122,7 @@ int a_Web_dispatch_by_type (const char *Type, DilloWeb *Web,
DilloWeb* a_Web_new(BrowserWindow *bw, const DilloUrl *url,
const DilloUrl *requester)
{
DilloWeb *web= dNew(DilloWeb, 1);
DilloWeb *web= new DilloWeb;
_MSG(" a_Web_new: ValidWebs ==> %d\n", dList_length(ValidWebs));
web->url = a_Url_dup(url).release();
@ -159,6 +159,6 @@ void a_Web_free(DilloWeb *web)
dFree(web->filename);
dList_remove(ValidWebs, (void *)web);
_MSG("a_Web_free: ValidWebs=%d\n", dList_length(ValidWebs));
dFree(web);
delete web;
}

View File

@ -18,9 +18,8 @@ extern "C" {
#define WEB_Download 8 /* Half implemented... */
typedef struct _DilloWeb DilloWeb;
struct _DilloWeb {
struct DilloWeb {
DilloUrl *url; /**< Requested URL */
DilloUrl *requester; /**< URL that caused this request, or
**< NULL if user-initiated. */