summaryrefslogtreecommitdiffstats
path: root/src/kiro-trb.c
diff options
context:
space:
mode:
authorTimo Dritschler <timo.dritschler@kit.edu>2014-11-20 17:37:55 +0100
committerTimo Dritschler <timo.dritschler@kit.edu>2014-11-20 17:53:19 +0100
commit65c2326592b7b1496c468459689904843e443b26 (patch)
tree7dc907bc82227851bc8e13827ae25cbabcf9ba1f /src/kiro-trb.c
parente71b75575658c435bc77c01ef098336c563af740 (diff)
downloadkiro-65c2326592b7b1496c468459689904843e443b26.tar.gz
kiro-65c2326592b7b1496c468459689904843e443b26.tar.bz2
kiro-65c2326592b7b1496c468459689904843e443b26.tar.xz
kiro-65c2326592b7b1496c468459689904843e443b26.zip
Release KIRO to GitHub under LGPL v2.1
Added kiro_*_free methods to all three units Added installation guide Added readme Added licence file
Diffstat (limited to 'src/kiro-trb.c')
-rw-r--r--src/kiro-trb.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/kiro-trb.c b/src/kiro-trb.c
index 6737f83..e26d12a 100644
--- a/src/kiro-trb.c
+++ b/src/kiro-trb.c
@@ -70,6 +70,19 @@ kiro_trb_new (void)
}
+void
+kiro_trb_free (KiroTrb *trb)
+{
+ if (!trb)
+ return;
+
+ if (KIRO_IS_TRB (trb))
+ g_object_unref (trb);
+ else
+ g_warning ("Trying to use kiro_trb_free on an object which is not a KIRO TRB. Ignoring...");
+}
+
+
static
void kiro_trb_init (KiroTrb *self)
{
@@ -77,6 +90,7 @@ void kiro_trb_init (KiroTrb *self)
priv->initialized = 0;
}
+
static void
kiro_trb_finalize (GObject *object)
{
@@ -87,6 +101,7 @@ kiro_trb_finalize (GObject *object)
free (priv->mem);
}
+
static void
kiro_trb_class_init (KiroTrbClass *klass)
{
@@ -164,7 +179,6 @@ kiro_trb_get_raw_buffer (KiroTrb *self)
}
-
void *
kiro_trb_get_element (KiroTrb *self, uint64_t element)
{
@@ -345,3 +359,4 @@ kiro_trb_clone (KiroTrb *self, void *buff_in)
kiro_trb_refresh (self);
return 0;
}
+