diff options
author | Owen Taylor <otaylor@redhat.com> | 2005-04-08 13:14:17 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@redhat.com> | 2005-04-08 13:14:17 +0000 |
commit | c803908d95d0022463d138f0caee949b14d0cadb (patch) | |
tree | 7e93e35f8e335c977b466f1a998a3cb03d80c3a0 /test/user-data.c | |
parent | 7aa5b71e8cc42bdcc935ad0990a0ac434dd0aa0e (diff) |
src/cairo.h src/cairo-font.c src/cairoint.h doc/public/cairo-sections.txt: Add cairo_font_face_set/get_user_data().
src/cairo-array.c src/cairoint.h src/cairo-surface.c: Refactor user data code from cairo-surface.c into cairo_user_data_array_t.
Switch these types to be like cairo_surface_t where the generic code frees the wrapper object.
src/cairo-atsui-font.c src/cairo-ft-font.c src/cairo-win32-font.c: Fix up for the above changes.
Implement a complicated mutual-referencing scheme to make sure that a face from cairo_ft_font_face_create_for_ft_face() is freed only when the FT_Face is no longer needed.
Update the docs to describe how to figure out when the FT_Face can be freed.
Fix refcount leaks when creating fonts.
Remove excess call to _cairo_unscaled_font_reference().
Remove stray initialization of font matrix to the identity.
test/user-data.c: Fix a bug when setting/unsetting a key with a free key slot before it, add that to the test case.
Don't append an element when user_data is NULL.
Diffstat (limited to 'test/user-data.c')
-rw-r--r-- | test/user-data.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/user-data.c b/test/user-data.c index 88a706afa..d17b933bb 100644 --- a/test/user-data.c +++ b/test/user-data.c @@ -60,6 +60,10 @@ main (void) assert (data1 == 1); assert (data2 == 0); + assert (cairo_surface_set_user_data (surface, &key2, NULL, NULL) + == CAIRO_STATUS_SUCCESS); + assert (data2 == 2); + data1 = 0; assert (cairo_surface_set_user_data (surface, &key1, &data1, NULL) == CAIRO_STATUS_SUCCESS); |