Plumbing ownership further; some things became C++
This commit is contained in:
@ -53,7 +53,7 @@ int a_History_add_url(DilloUrl *url)
|
||||
|
||||
_MSG("a_History_add_url: '%s' ", URL_STR(url));
|
||||
for (i = 0; i < history_size; ++i)
|
||||
if (!a_Url_cmp(*history[i].url, *url) &&
|
||||
if (!a_Url_cmp(history[i].url, url) &&
|
||||
!strcmp(URL_FRAGMENT(history[i].url), URL_FRAGMENT(url)))
|
||||
break;
|
||||
|
||||
@ -63,7 +63,7 @@ int a_History_add_url(DilloUrl *url)
|
||||
} else {
|
||||
idx = history_size;
|
||||
a_List_add(history, history_size, history_size_max, H_Item);
|
||||
history[idx].url = a_Url_dup(*url).release();
|
||||
history[idx].url = a_Url_dup(url).release();
|
||||
history[idx].title = NULL;
|
||||
++history_size;
|
||||
_MSG("ADDED at idx=%d\n", idx);
|
||||
@ -114,7 +114,7 @@ const char *a_History_get_title_by_url(const DilloUrl *url, int force)
|
||||
dReturn_val_if_fail(url != NULL, NULL);
|
||||
|
||||
for (i = 0; i < history_size; ++i)
|
||||
if (a_Url_cmp(*url, *history[i].url) == 0)
|
||||
if (a_Url_cmp(url, history[i].url) == 0)
|
||||
break;
|
||||
|
||||
if (i < history_size && history[i].title)
|
||||
@ -134,7 +134,7 @@ void a_History_set_title_by_url(const DilloUrl *url, const char *title)
|
||||
dReturn_if (url == NULL);
|
||||
|
||||
for (i = history_size - 1; i >= 0; --i)
|
||||
if (a_Url_cmp(*url, *history[i].url) == 0)
|
||||
if (a_Url_cmp(url, history[i].url) == 0)
|
||||
break;
|
||||
|
||||
if (i >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user