pixman: Branch 'master'

Aaron Plattner aplattner at kemper.freedesktop.org
Mon Aug 6 15:09:21 PDT 2007


 pixman/pixman-image.c |    7 ++++++-
 pixman/pixman.h       |    2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
diff-tree 778a3f9d7136de062806473dd3604eb03ba5d866 (from 4838e2e9d9635883841e692a7074bcb2be96dcf5)
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Wed Aug 1 14:16:55 2007 -0700

    Return a bool from pixman_image_unref.
    
    Returns TRUE when the refcount reaches 0 and the image is freed.

diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index ca186a3..2cbf88c 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -106,7 +106,8 @@ pixman_image_ref (pixman_image_t *image)
     return image;
 }
 
-void
+/* returns TRUE when the image is freed */
+pixman_bool_t
 pixman_image_unref (pixman_image_t *image)
 {
     image_common_t *common = (image_common_t *)image;
@@ -146,7 +147,11 @@ pixman_image_unref (pixman_image_t *imag
 	    free (image->bits.free_me);
 	
 	free (image);
+
+	return TRUE;
     }
+
+    return FALSE;
 }
 
 /* Constructors */
diff --git a/pixman/pixman.h b/pixman/pixman.h
index 74358e0..ae5aa7a 100644
--- a/pixman/pixman.h
+++ b/pixman/pixman.h
@@ -451,7 +451,7 @@ pixman_image_t *pixman_image_create_bits
 
 /* Destructor */
 pixman_image_t *pixman_image_ref                     (pixman_image_t               *image);
-void            pixman_image_unref                   (pixman_image_t               *image);
+pixman_bool_t   pixman_image_unref                   (pixman_image_t               *image);
 
 
 /* Set properties */


More information about the xorg-commit mailing list