[cairo] Entry points for nonexistent backends?

Carl Worth cworth at cworth.org
Wed Aug 15 10:23:19 PDT 2007


On Wed, 15 Aug 2007 14:40:58 +0300, Tor Lillqvist wrote:
>
> I thus suggest that the public functions from the optional backends
> should be always present in the cairo binary, but in such a form that
> if the corresponding backend is not compiled in the functions would
> always return NULL, -1, or whatever appropriate kind of error
> indication. The CAIRO_HAS_* feature test macros in the corresponding
> cairo-features.h header should still correspond to reality.

I don't think I like this.

Imagining a problematic scenario, (an application expecting a backend
to be available but run against a cairo compiled without that
backend), it seems likely to take a useful error message:

	linker: failed to find symbol cairo_glitz_surface_create

and replace that instead with an obscure failure of the application,
(segfault, etc.), with no error message.

Also, it would introduce failure modes into all cairo functions that
currently don't exist, (currently, all cairo_<object>_create functions
are documented to never return NULL).

-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.cairographics.org/archives/cairo/attachments/20070815/c2824232/attachment.pgp 


More information about the cairo mailing list