[cairo-commit] cairo/src cairo-image-surface.c,1.59,1.60

Owen Taylor commit at pdx.freedesktop.org
Sat Aug 27 18:40:49 PDT 2005


Committed by: otaylor

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv18827/src

Modified Files:
	cairo-image-surface.c 
Log Message:
2005-08-27  Owen Taylor  <otaylor at redhat.com>

        * src/cairo-image-surface.c (cairo_image_surface_create)
        (cairo_image_surface_create_for_data): Fix docs not to talk about
        %NULL returns. #4271, Duncan Coutts.


Index: cairo-image-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-image-surface.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- cairo-image-surface.c	18 Aug 2005 22:50:36 -0000	1.59
+++ cairo-image-surface.c	28 Aug 2005 01:40:47 -0000	1.60
@@ -149,8 +149,13 @@
  * must explicitely clear the buffer, using, for example,
  * cairo_rectangle() and cairo_fill() if you want it cleared.
  *
- * Return value: the newly created surface, or %NULL if it couldn't
- *   be created because of lack of memory
+ * Return value: a pointer to the newly created surface. The caller
+ * owns the surface and should call cairo_surface_destroy when done
+ * with it.
+ *
+ * This function always returns a valid pointer, but it will return a
+ * pointer to a "nil" surface if an error such as out of memory
+ * occurs. You can use cairo_surface_status() to check for this.
  **/
 cairo_surface_t *
 cairo_image_surface_create (cairo_format_t	format,
@@ -203,8 +208,13 @@
  * must explicitely clear the buffer, using, for example,
  * cairo_rectangle() and cairo_fill() if you want it cleared.
  *
- * Return value: the newly created surface, or %NULL if it couldn't
- *   be created because of lack of memory
+ * Return value: a pointer to the newly created surface. The caller
+ * owns the surface and should call cairo_surface_destroy when done
+ * with it.
+ *
+ * This function always returns a valid pointer, but it will return a
+ * pointer to a "nil" surface if an error such as out of memory
+ * occurs. You can use cairo_surface_status() to check for this.
  **/
 cairo_surface_t *
 cairo_image_surface_create_for_data (unsigned char     *data,



More information about the cairo-commit mailing list