Skip to content

Commit de534a9

Browse files
committed
Use function with more descriptive name
1 parent 80ac885 commit de534a9

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

zathura/plugin.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ zathura_plugin_manager_t* zathura_plugin_manager_new(void) {
8989
return NULL;
9090
}
9191

92-
plugin_manager->plugins = girara_list_new2(zathura_plugin_free);
93-
plugin_manager->path = girara_list_new2(g_free);
94-
plugin_manager->type_plugin_mapping = girara_list_new2(zathura_type_plugin_mapping_free);
95-
plugin_manager->content_types = girara_list_new2(g_free);
92+
plugin_manager->plugins = girara_list_new_with_free(zathura_plugin_free);
93+
plugin_manager->path = girara_list_new_with_free(g_free);
94+
plugin_manager->type_plugin_mapping = girara_list_new_with_free(zathura_type_plugin_mapping_free);
95+
plugin_manager->content_types = girara_list_new_with_free(g_free);
9696

9797
if (plugin_manager->plugins == NULL || plugin_manager->path == NULL || plugin_manager->type_plugin_mapping == NULL ||
9898
plugin_manager->content_types == NULL) {

zathura/synctex.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ girara_list_t* synctex_rectangles_from_position(zathura_t* zathura, const char*
148148
return false;
149149
}
150150

151-
g_autoptr(girara_list_t) hitlist = girara_list_new2(g_free);
152-
g_autoptr(girara_list_t) other_rects = girara_list_new2(g_free);
151+
g_autoptr(girara_list_t) hitlist = girara_list_new_with_free(g_free);
152+
g_autoptr(girara_list_t) other_rects = girara_list_new_with_free(g_free);
153153

154154
if (synctex_display_query(scanner, input_file, line, column, -1) > 0) {
155155
synctex_node_p node = NULL;
@@ -349,7 +349,7 @@ bool synctex_view(zathura_t* zathura, const char* input_file, unsigned int line,
349349
if (p == page) {
350350
all_rectangles[p] = rectangles;
351351
} else {
352-
all_rectangles[p] = girara_list_new2(g_free);
352+
all_rectangles[p] = girara_list_new_with_free(g_free);
353353
}
354354
}
355355

zathura/types.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static void document_information_entry_free(void* data) {
7676
}
7777

7878
girara_list_t* zathura_document_information_entry_list_new(void) {
79-
return girara_list_new2(document_information_entry_free);
79+
return girara_list_new_with_free(document_information_entry_free);
8080
}
8181

8282
zathura_document_information_entry_t* zathura_document_information_entry_new(zathura_document_information_type_t type,

zathura/utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@ static void cut_rectangle(const zathura_rectangle_t* rect, girara_list_t* points
588588
}
589589

590590
girara_list_t* flatten_rectangles(girara_list_t* rectangles) {
591-
girara_list_t* new_rectangles = girara_list_new2(g_free);
592-
g_autoptr(girara_list_t) points = girara_list_new2(g_free);
591+
girara_list_t* new_rectangles = girara_list_new_with_free(g_free);
592+
g_autoptr(girara_list_t) points = girara_list_new_with_free(g_free);
593593
girara_list_foreach(rectangles, rectangle_to_points, points);
594594

595595
for (size_t idx = 0; idx != girara_list_size(rectangles); ++idx) {

zathura/zathura.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,8 @@ bool zathura_init(zathura_t* zathura) {
423423
#endif
424424

425425
/* bookmarks */
426-
zathura->bookmarks.bookmarks = girara_sorted_list_new2((girara_compare_function_t)zathura_bookmarks_compare,
427-
(girara_free_function_t)zathura_bookmark_free);
426+
zathura->bookmarks.bookmarks = girara_sorted_list_new_with_free((girara_compare_function_t)zathura_bookmarks_compare,
427+
(girara_free_function_t)zathura_bookmark_free);
428428

429429
/* jumplist */
430430
int jumplist_size = 20;
@@ -1193,11 +1193,11 @@ bool document_open(zathura_t* zathura, const char* path, const char* uri, const
11931193
/* quickmarks */
11941194
if (zathura_quickmarks_load(zathura, file_path) == false) {
11951195
girara_debug("Failed to load quickmarks.");
1196-
zathura->global.marks = girara_list_new2(g_free);
1196+
zathura->global.marks = girara_list_new_with_free(g_free);
11971197
}
11981198
} else {
11991199
/* create fallback lists */
1200-
zathura->global.marks = girara_list_new2(g_free);
1200+
zathura->global.marks = girara_list_new_with_free(g_free);
12011201
}
12021202

12031203
if (zathura_jumplist_is_initalized(zathura) == false || zathura->global.marks == NULL) {

0 commit comments

Comments
 (0)