From 65c2326592b7b1496c468459689904843e443b26 Mon Sep 17 00:00:00 2001 From: Timo Dritschler Date: Thu, 20 Nov 2014 17:37:55 +0100 Subject: Release KIRO to GitHub under LGPL v2.1 Added kiro_*_free methods to all three units Added installation guide Added readme Added licence file --- src/kiro-trb.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/kiro-trb.c') 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; } + -- cgit v1.2.3