[tracker] Add all properties in property constructor/destructor
- From: Ivan Frade <ifrade src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] Add all properties in property constructor/destructor
- Date: Mon, 23 Nov 2009 12:10:35 +0000 (UTC)
commit dc243e5d3ebba4d09b630f06e8311b430698d01b
Author: Ivan Frade <ivan frade nokia com>
Date: Mon Nov 23 13:40:21 2009 +0200
Add all properties in property constructor/destructor
utils/services/ttl_model.c | 13 ++++++++++---
utils/services/ttl_model.h | 1 +
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/utils/services/ttl_model.c b/utils/services/ttl_model.c
index fc0fce6..31b1666 100644
--- a/utils/services/ttl_model.c
+++ b/utils/services/ttl_model.c
@@ -13,7 +13,7 @@ ttl_model_class_new (const gchar *classname)
def->in_domain_of = NULL;
def->in_range_of = NULL;
def->description = NULL;
-
+ def->instances = NULL;
return def;
}
@@ -32,6 +32,7 @@ ttl_model_class_free (OntologyClass *def)
if (def->description) {
g_free (def->description);
}
+ g_list_foreach (def->instances, (GFunc) g_free, NULL);
g_free (def);
}
@@ -89,10 +90,12 @@ ttl_model_description_new (void)
desc->authors = NULL;
desc->editors = NULL;
desc->contributors = NULL;
+ desc->gitlog = NULL;
+ desc->upstream = NULL;
+ desc->copyright = NULL;
desc->baseUrl = NULL;
- desc->relativePath = NULL;
desc->localPrefix = NULL;
-
+ desc->relativePath = NULL;
return desc;
}
@@ -105,6 +108,10 @@ ttl_model_description_free (OntologyDescription *desc)
g_list_foreach (desc->editors, (GFunc)g_free, NULL);
g_list_foreach (desc->contributors, (GFunc)g_free, NULL);
+ g_free (desc->gitlog);
+ g_free (desc->upstream);
+ g_free (desc->copyright);
+
g_free (desc->baseUrl);
g_free (desc->relativePath);
g_free (desc->localPrefix);
diff --git a/utils/services/ttl_model.h b/utils/services/ttl_model.h
index b5a002e..c5c6424 100644
--- a/utils/services/ttl_model.h
+++ b/utils/services/ttl_model.h
@@ -12,6 +12,7 @@ typedef struct {
GList *in_domain_of;
GList *in_range_of;
gchar *description;
+ GList *instances;
} OntologyClass;
typedef struct {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]