[pango: 2/16] [pango-coverage] Use gslice for data arrays



commit fa908f4cb6db943b555a51d1ce4bf01112b1a710
Author: Behdad Esfahbod <behdad behdad org>
Date:   Tue Mar 10 09:05:39 2009 -0400

    [pango-coverage] Use gslice for data arrays
---
 pango/pango-coverage.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pango/pango-coverage.c b/pango/pango-coverage.c
index 30c9209..5b7ddad 100644
--- a/pango/pango-coverage.c
+++ b/pango/pango-coverage.c
@@ -144,7 +144,7 @@ pango_coverage_unref (PangoCoverage *coverage)
   if (g_atomic_int_dec_and_test ((int *) &coverage->ref_count))
     {
       for (i=0; i<coverage->n_blocks; i++)
-	g_free (coverage->blocks[i].data);
+	g_slice_free1 (64, coverage->blocks[i].data);
 
       g_free (coverage->blocks);
       g_slice_free (PangoCoverage, coverage);
@@ -235,7 +235,7 @@ pango_coverage_set (PangoCoverage     *coverage,
       if (level == coverage->blocks[block_index].level)
 	return;
 
-      data = g_new (guchar, 64);
+      data = g_slice_alloc (64);
       coverage->blocks[block_index].data = data;
 
       byte = coverage->blocks[block_index].level |
@@ -398,7 +398,7 @@ pango_coverage_to_bytes   (PangoCoverage  *coverage,
 
 	  if (j == 64)
 	    {
-	      g_free (data);
+	      g_slice_free1 (64, data);
 	      coverage->blocks[i].data = NULL;
 	      coverage->blocks[i].level = first_val & 0x3;
 	    }



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