summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2005-08-27 18:40:46 +0000
committerOwen Taylor <otaylor@redhat.com>2005-08-27 18:40:46 +0000
commit3c53414cf34d2027284bdbd4836d10a2c0d998c0 (patch)
tree413675076b27f00159e0510ab232b5596102e2af
parentc0da73e1b8e5933ca117512499ccac4e208bd8e0 (diff)
Fix docs not to talk about %NULL returns. #4271, Duncan Coutts.
-rw-r--r--ChangeLog6
-rw-r--r--src/cairo-image-surface.c18
2 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b69510330..500d4ad4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-27 Owen Taylor <otaylor@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.
+
2005-08-25 Tor Lillqvist <tml@novell.com>
* Makefile.am (developer_zip_file): Include the documentation, too.
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 3b59a8b37..cc675c064 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -149,8 +149,13 @@ _create_pixman_format (cairo_format_t format)
* 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 @@ cairo_image_surface_create (cairo_format_t format,
* 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,