Use new/delete for another struct
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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. */
|
||||
|
Reference in New Issue
Block a user