diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-07 13:26:46 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-07 19:30:33 +0000 |
commit | 2554d1759835a174b89107808d81d044c3e2e098 (patch) | |
tree | 0b18975ffbadbaa47bdcccb68f6bacabbc99306f /src/cairo-png.c | |
parent | ff0bd64e9436026f11e85eafcd74e9a0131c8b9f (diff) |
[surface] Pass a separate closure for the mime-type destroy notifier.
A limitation of the current API was that the destroy notifier was called
on the mime-data block. This prevents the user from passing in a pointer
to a managed block, for example a mime-data block belonging to a
ref-counted object. We can overcome this by allowing the user to specify
the closure to be used with the destroy notifier.
Diffstat (limited to 'src/cairo-png.c')
-rw-r--r-- | src/cairo-png.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-png.c b/src/cairo-png.c index a130ba25..e8f61b5d 100644 --- a/src/cairo-png.c +++ b/src/cairo-png.c @@ -662,7 +662,8 @@ read_png (struct png_read_closure_t *png_closure) CAIRO_MIME_TYPE_PNG, mime_data, mime_data_length, - free); + free, + mime_data); if (status) { free (mime_data); cairo_surface_destroy (surface); |