summaryrefslogtreecommitdiff
path: root/test/mime-data.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-11-07 13:26:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2008-11-07 19:30:33 +0000
commit2554d1759835a174b89107808d81d044c3e2e098 (patch)
tree0b18975ffbadbaa47bdcccb68f6bacabbc99306f /test/mime-data.c
parentff0bd64e9436026f11e85eafcd74e9a0131c8b9f (diff)
downloadcairo-2554d1759835a174b89107808d81d044c3e2e098.tar.gz
[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 'test/mime-data.c')
-rw-r--r--test/mime-data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/mime-data.c b/test/mime-data.c
index 87fe74c86..ec855f852 100644
--- a/test/mime-data.c
+++ b/test/mime-data.c
@@ -96,7 +96,8 @@ paint_file (cairo_t *cr,
image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 200, 50);
status = cairo_surface_set_mime_data (image, mime_type,
- mime_data, mime_length, free);
+ mime_data, mime_length,
+ free, mime_data);
if (status) {
cairo_surface_destroy (image);
return cairo_test_status_from_status (ctx, status);