diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-01-16 16:23:23 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-01-16 16:51:32 +0000 |
commit | 7111b18c27d7ee0439339a6aa72f0e4244f883f9 (patch) | |
tree | 162d5cf10b629ded2a44f8bb1cc64e4671a58cc7 /src/test-paginated-surface.c | |
parent | 5cbc45488e276cb6e6ecfa7bc7dd4fae342de85e (diff) | |
download | cairo-7111b18c27d7ee0439339a6aa72f0e4244f883f9.tar.gz |
[cairo-surface] Introduce _cairo_surface_create_in_error().
Unexport all the static error surfaces and use a function to select
the appropriate error surface for the status.
Diffstat (limited to 'src/test-paginated-surface.c')
-rw-r--r-- | src/test-paginated-surface.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test-paginated-surface.c b/src/test-paginated-surface.c index 7d341ad78..f640b6068 100644 --- a/src/test-paginated-surface.c +++ b/src/test-paginated-surface.c @@ -77,13 +77,12 @@ _cairo_test_paginated_surface_create_for_data (unsigned char *data, stride); status = cairo_surface_status (target); if (status) - return (cairo_surface_t *) &_cairo_surface_nil; + return target; surface = malloc (sizeof (test_paginated_surface_t)); if (surface == NULL) { cairo_surface_destroy (target); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t *) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } _cairo_surface_init (&surface->base, &test_paginated_surface_backend, |