[gnome-builder] symbol: use g_slice



commit b56d32eb36e476631623ed1e55467fc86d4e19af
Author: Christian Hergert <christian hergert me>
Date:   Mon May 11 00:56:28 2015 -0700

    symbol: use g_slice

 libide/ide-symbol.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libide/ide-symbol.c b/libide/ide-symbol.c
index 65003fc..98aabab 100644
--- a/libide/ide-symbol.c
+++ b/libide/ide-symbol.c
@@ -50,7 +50,7 @@ _ide_symbol_new (const gchar       *name,
 {
   IdeSymbol *ret;
 
-  ret = g_new0 (IdeSymbol, 1);
+  ret = g_slice_new0 (IdeSymbol);
   ret->ref_count = 1;
   ret->kind = kind;
   ret->flags = flags;
@@ -167,7 +167,7 @@ ide_symbol_unref (IdeSymbol *self)
       g_clear_pointer (&self->definition_location, ide_source_location_unref);
       g_clear_pointer (&self->canonical_location, ide_source_location_unref);
       g_clear_pointer (&self->name, g_free);
-      g_free (self);
+      g_slice_free (IdeSymbol, self);
 
       EGG_COUNTER_DEC (instances);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]