aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorNotZed <NotZed@HelixCode.com>2000-05-03 06:02:49 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-03 06:02:49 +0800
commit38d9cc1278541b84202c4b3e1555b6d2e36beaca (patch)
treef74dfe4a147e89646bffbb28b7d4e9f3c5befdc1 /e-util
parent855b85657d2536eb67108318336ad1d19206a320 (diff)
downloadgsoc2013-evolution-38d9cc1278541b84202c4b3e1555b6d2e36beaca.tar.gz
gsoc2013-evolution-38d9cc1278541b84202c4b3e1555b6d2e36beaca.tar.zst
gsoc2013-evolution-38d9cc1278541b84202c4b3e1555b6d2e36beaca.zip
Free the parse tree if we have one. (e_sexp_parse): If we already have a
2000-05-02 NotZed <NotZed@HelixCode.com> * e-sexp.c (e_sexp_finalise): Free the parse tree if we have one. (e_sexp_parse): If we already have a parse tree, free it. svn path=/trunk/; revision=2757
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-sexp.c21
2 files changed, 26 insertions, 0 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index aa338ae2c4..f70ca5ec1c 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-02 NotZed <NotZed@HelixCode.com>
+
+ * e-sexp.c (e_sexp_finalise): Free the parse tree if we have one.
+ (e_sexp_parse): If we already have a parse tree, free it.
+
2000-05-02 Matt Loper <matt@helixcode.com>
* Makefile.am: set G_LOG_DOMAIN.
diff --git a/e-util/e-sexp.c b/e-util/e-sexp.c
index ad36c368bf..0f9abc636a 100644
--- a/e-util/e-sexp.c
+++ b/e-util/e-sexp.c
@@ -869,12 +869,17 @@ camel_mbox_folder_search_by_expression(CamelFolder *folder, char *expression, Ca
#endif
+static void e_sexp_finalise(GtkObject *);
+
static void
e_sexp_class_init (ESExpClass *class)
{
GtkObjectClass *object_class;
object_class = (GtkObjectClass *) class;
+
+ object_class->finalize = e_sexp_finalise;
+
parent_class = gtk_type_class (gtk_object_get_type ());
}
@@ -898,6 +903,19 @@ static struct {
};
static void
+e_sexp_finalise(GtkObject *o)
+{
+ ESExp *s = (ESExp *)o;
+
+ if (s->tree) {
+ parse_term_free(s->tree);
+ s->tree = NULL;
+ }
+
+ ((GtkObjectClass *)(parent_class))->finalize((GtkObject *)o);
+}
+
+static void
e_sexp_init (ESExp *s)
{
int i;
@@ -1041,6 +1059,9 @@ e_sexp_parse(ESExp *f)
{
g_return_if_fail(FILTER_IS_SEXP(f));
+ if (f->tree)
+ parse_term_free(f->tree);
+
f->tree = parse_list(f, FALSE);
if (f->tree)
t.cgi/freebsd-ports-gnome/commit/devel/p5-MooseX-MethodAttributes?h=gnome-3.24&id=5607ccc4e5250be05873c5befea57cac6274645f'>Update to 0.15skv2009-08-182-4/+5 * Update to 0.14skv2009-06-183-6/+10 * - Update to 0.11pgollucci2009-06-062-4/+4