Changeset 3cdd6d2
- Timestamp:
- Jun 25, 2011, 3:26:15 AM (13 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- ce68f23
- Parents:
- e4524da
- git-author:
- David Benjamin <davidben@mit.edu> (06/11/11 19:49:43)
- git-committer:
- David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
buddylist.c
rd191f45 r3cdd6d2 134 134 void owl_buddylist_cleanup(owl_buddylist *bl) 135 135 { 136 g_ptr_array_foreach(bl->buddies, (GFunc)owl_buddy_delete, NULL); 137 g_ptr_array_free(bl->buddies, true); 136 owl_ptr_array_free(bl->buddies, (GDestroyNotify)owl_buddy_delete); 138 137 } -
functions.c
re4524da r3cdd6d2 2779 2779 2780 2780 owl_function_punt(argv->len, (const char *const*) argv->pdata, direction); 2781 g_ptr_array_foreach(argv, (GFunc)g_free, NULL); 2782 g_ptr_array_free(argv, true); 2781 owl_ptr_array_free(argv, g_free); 2783 2782 } 2784 2783 … … 3073 3072 } 3074 3073 } 3075 g_ptr_array_foreach(anyone, (GFunc)g_free, NULL); 3076 g_ptr_array_free(anyone, true); 3074 owl_ptr_array_free(anyone, g_free); 3077 3075 } 3078 3076 } … … 3418 3416 } 3419 3417 3420 g_ptr_array_foreach(anyone, (GFunc)g_free, NULL); 3421 g_ptr_array_free(anyone, true); 3418 owl_ptr_array_free(anyone, g_free); 3422 3419 #endif 3423 3420 } -
keymap.c
re4d7cb6 r3cdd6d2 24 24 g_free(km->name); 25 25 g_free(km->desc); 26 g_ptr_array_foreach(km->bindings, (GFunc)owl_keybinding_delete, NULL); 27 g_ptr_array_free(km->bindings, true); 26 owl_ptr_array_free(km->bindings, (GDestroyNotify)owl_keybinding_delete); 28 27 } 29 28 -
util.c
r6829afc r3cdd6d2 98 98 } 99 99 100 void owl_ptr_array_free(GPtrArray *array, GDestroyNotify element_free_func) 101 { 102 /* TODO: when we move to requiring glib 2.22+, use 103 * g_ptr_array_new_with_free_func instead. */ 104 if (element_free_func) 105 g_ptr_array_foreach(array, (GFunc)element_free_func, NULL); 106 g_ptr_array_free(array, true); 107 } 108 100 109 /* Break a command line up into argv, argc. The caller must free 101 110 the returned values with g_strfreev. If there is an error argc will be set … … 170 179 /* check for unbalanced quotes */ 171 180 if (quote!='\0') { 172 /* TODO: when we move to requiring glib 2.22+, use 173 * g_ptr_array_new_with_free_func. */ 174 g_ptr_array_foreach(argv, (GFunc)g_free, NULL); 175 g_ptr_array_free(argv, true); 181 owl_ptr_array_free(argv, g_free); 176 182 if (argc) *argc = -1; 177 183 return(NULL); -
zwrite.c
r12294d2 r3cdd6d2 348 348 void owl_zwrite_cleanup(owl_zwrite *z) 349 349 { 350 g_ptr_array_foreach(z->recips, (GFunc)g_free, NULL); 351 g_ptr_array_free(z->recips, true); 350 owl_ptr_array_free(z->recips, g_free); 352 351 g_free(z->cmd); 353 352 g_free(z->zwriteline);
Note: See TracChangeset
for help on using the changeset viewer.