summaryrefslogtreecommitdiff
path: root/src/bookmarks.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-14 17:08:39 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-14 17:08:39 +0300
commitf60baccbe3e04769e9bab66625a4f3923a01f191 (patch)
tree2623a655e952e972827a2fbf110093d065dc5d7b /src/bookmarks.c
parentf8f382ed14151d3c293a9ee754f0a66f513fb7d3 (diff)
Deleting bookmarks
Diffstat (limited to 'src/bookmarks.c')
-rw-r--r--src/bookmarks.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bookmarks.c b/src/bookmarks.c
index 96a2b6a0..29b3d836 100644
--- a/src/bookmarks.c
+++ b/src/bookmarks.c
@@ -118,8 +118,13 @@ void add_Bookmarks(iBookmarks *d, const iString *url, const iString *title, cons
118 insert_Bookmarks_(d, bm); 118 insert_Bookmarks_(d, bm);
119} 119}
120 120
121void remove_Bookmarks(iBookmarks *d, uint32_t id) { 121iBool remove_Bookmarks(iBookmarks *d, uint32_t id) {
122 delete_Bookmark((iBookmark *) remove_Hash(&d->bookmarks, id)); 122 iBookmark *bm = (iBookmark *) remove_Hash(&d->bookmarks, id);
123 if (bm) {
124 delete_Bookmark(bm);
125 return iTrue;
126 }
127 return iFalse;
123} 128}
124 129
125const iPtrArray *list_Bookmarks(const iBookmarks *d, iBookmarksFilterFunc filter, 130const iPtrArray *list_Bookmarks(const iBookmarks *d, iBookmarksFilterFunc filter,