From 106c466ccd8c68efd0e75862b883366ba2c930da Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Tue, 15 Apr 2003 21:31:22 +0000 Subject: Make sure any old symbol with the same name as the one being added, is 2003-04-15 Hans Petter Jansson * e-sexp.c (e_sexp_add_function) (e_sexp_add_ifunction): Make sure any old symbol with the same name as the one being added, is removed first. svn path=/trunk/; revision=20852 --- e-util/ChangeLog | 6 ++++++ e-util/e-sexp.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/e-util/ChangeLog b/e-util/ChangeLog index fd727c9505..9458c4fdc3 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,9 @@ +2003-04-15 Hans Petter Jansson + + * e-sexp.c (e_sexp_add_function) + (e_sexp_add_ifunction): Make sure any old symbol with the same name + as the one being added, is removed first. + 2003-04-14 Not Zed * e-gtk-utils.c (e_gtk_button_new_with_icon): Utility function to diff --git a/e-util/e-sexp.c b/e-util/e-sexp.c index f21c6dacd3..a9b46e440f 100644 --- a/e-util/e-sexp.c +++ b/e-util/e-sexp.c @@ -1181,6 +1181,8 @@ e_sexp_add_function(ESExp *f, int scope, char *name, ESExpFunc *func, void *data g_return_if_fail (IS_E_SEXP (f)); g_return_if_fail (name != NULL); + e_sexp_remove_symbol (f, scope, name); + s = g_malloc0(sizeof(*s)); s->name = g_strdup(name); s->f.func = func; @@ -1197,6 +1199,8 @@ e_sexp_add_ifunction(ESExp *f, int scope, char *name, ESExpIFunc *ifunc, void *d g_return_if_fail (IS_E_SEXP (f)); g_return_if_fail (name != NULL); + e_sexp_remove_symbol (f, scope, name); + s = g_malloc0(sizeof(*s)); s->name = g_strdup(name); s->f.ifunc = ifunc; -- cgit v1.2.3