[cairo] CAIRO_CONTENT_VALID and CAIRO_FORMAT_VALID macros

Carl Worth cworth at cworth.org
Mon Aug 22 10:42:06 PDT 2005


On Sun, 21 Aug 2005 15:18:13 -0500, Billy Biggs wrote:
>   The macros CAIRO_CONTENT_VALID and CAIRO_FORMAT_VALID are currently
> defined in the public API, and I would like to propose removing them.
> 
>   1. They're macros which will be invalid in compiled code if the enums
>      are expanded
>   2. Wrapper APIs which use them for sanity checking will fail if their
>      clients somehow use some new types added in the future
>   3. They're not all that useful
>   4. Similar macros don't exist for many of the other types

Yes, I agree. These were my fault. I put them next to the enum
definition since they need to be maintained together, but they were
never intended to be public API.

>   However, this would be a very last-minute change and could break
> someone.

This breakage would have the benefit of being obvious, (and very easy
to fix---just remove the use of these macros completely), as opposed
to silently introducing a bug now that may show up in more subtle ways
down the road (#1 and #2 above).

These macros haven't existed for long, (only since 0.6.0), and as per
#3 above, they're not useful, so I really don't expect anyone to be
calling them. The most likely place for these to get picked up would
be in language bindings, (since language binders are so meticulous),
but a quick check of all language bindings in cairo's CVS tree shows
that none of those are using it.

I'd like to remove these.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050822/c60ac90c/attachment-0001.pgp


More information about the cairo mailing list