diff options
author | Owen Taylor <otaylor@redhat.com> | 2005-08-27 18:40:46 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@redhat.com> | 2005-08-27 18:40:46 +0000 |
commit | 3c53414cf34d2027284bdbd4836d10a2c0d998c0 (patch) | |
tree | 413675076b27f00159e0510ab232b5596102e2af /src/cairo-image-surface.c | |
parent | c0da73e1b8e5933ca117512499ccac4e208bd8e0 (diff) | |
download | cairo-3c53414cf34d2027284bdbd4836d10a2c0d998c0.tar.gz |
Fix docs not to talk about %NULL returns. #4271, Duncan Coutts.
Diffstat (limited to 'src/cairo-image-surface.c')
-rw-r--r-- | src/cairo-image-surface.c | 18 |
1 files changed, 14 insertions, 4 deletions
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, |