diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2010-04-30 16:06:03 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2010-04-30 16:06:03 +0000 |
commit | 5e887908b34b804a19b2b7370b0aa358d0e55973 (patch) | |
tree | 68935c8d2fe196a64a17bace1508884d538a5e17 /gtk | |
parent | f0237aac922a3ee5b14233fa98baf19df97866ed (diff) | |
download | netsurf-5e887908b34b804a19b2b7370b0aa358d0e55973.tar.gz netsurf-5e887908b34b804a19b2b7370b0aa358d0e55973.tar.bz2 |
Consolidate several 'myrealloc' functions into ns_realloc, rename one which *is* different, thereby eliminating the word 'myrealloc' from the NS codebase
svn path=/trunk/netsurf/; revision=10530
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtk_gui.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c index 9a0eca10a..eec28a20a 100644 --- a/gtk/gtk_gui.c +++ b/gtk/gtk_gui.c @@ -98,7 +98,6 @@ static struct form_control *select_menu_control; static void nsgtk_init_glade(void); static void nsgtk_check_homedir(void); -static void *nsgtk_hubbub_realloc(void *ptr, size_t len, void *pw); static bool nsgtk_throbber_init(int framec); static void nsgtk_ssl_accept(GtkButton *w, gpointer data); static void nsgtk_ssl_reject(GtkButton *w, gpointer data); @@ -199,7 +198,7 @@ static void gui_init(int argc, char** argv) nsgtk_find_resource(buf, "Aliases", "./gtk/res/Aliases"); LOG(("Using '%s' as Aliases file", buf)); - if (hubbub_initialise(buf, nsgtk_hubbub_realloc, NULL) != HUBBUB_OK) + if (hubbub_initialise(buf, ns_realloc, NULL) != HUBBUB_OK) die("Unable to initialise HTML parsing library.\n"); nsgtk_find_resource(buf, "netsurf.xpm", "./gtk/res/netsurf.xpm"); @@ -501,7 +500,7 @@ void gui_quit(void) free(toolbar_indices_file_location); gtk_fetch_filetype_fin(); /* We don't care if this fails as we're about to die, anyway */ - hubbub_finalise(nsgtk_hubbub_realloc, NULL); + hubbub_finalise(ns_realloc, NULL); } @@ -533,19 +532,6 @@ void nsgtk_check_homedir(void) } -/** - * Allocator callback function for hubbub. - */ -void *nsgtk_hubbub_realloc(void *ptr, size_t len, void *pw) -{ - if (len == 0) { - free(ptr); - return NULL; - } - - return realloc(ptr, len); -} - /* This is an ugly hack to just get the new-style throbber going. * It, along with the PNG throbber loader, need making more generic. |