aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-sexp.c
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2003-04-16 05:31:22 +0800
committerHans Petter <hansp@src.gnome.org>2003-04-16 05:31:22 +0800
commit106c466ccd8c68efd0e75862b883366ba2c930da (patch)
tree535a856ec9e34186c5723114bbfe0772b67283d5 /e-util/e-sexp.c
parentc0c761da5f018b5b97c613f5ccdf2bf02efff94e (diff)
downloadgsoc2013-evolution-106c466ccd8c68efd0e75862b883366ba2c930da.tar.gz
gsoc2013-evolution-106c466ccd8c68efd0e75862b883366ba2c930da.tar.zst
gsoc2013-evolution-106c466ccd8c68efd0e75862b883366ba2c930da.zip
Make sure any old symbol with the same name as the one being added, is
2003-04-15 Hans Petter Jansson <hpj@ximian.com> * 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
Diffstat (limited to 'e-util/e-sexp.c')
-rw-r--r--e-util/e-sexp.c4
1 files changed, 4 insertions, 0 deletions
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;