[cairo] Making cairo_error weak
otaylor at redhat.com
Thu Aug 4 07:15:35 PDT 2005
On Tue, 2005-08-02 at 15:43 -0400, Behdad Esfahbod wrote:
> Attached patch sets a mechanism for toolkits and applications to
> override _cairo_error calls by defining cairo_error(status).
> If applied, then we need a function to map status codes to
> some meaningful strings.
> We can also define a default cairo_status that prints out a
> message, instead of aliasing it to _cairo_error that does sanity
I don't like this any more than the old cairo_set_error_notify(),
perhaps even less. A toolkit obviously should override this under no
circumstances, because it has no idea what other libraries are
being used within the process that want the function.
Maybe an app could use it an hook it up to a debug spew function,
but I think an environment variable that turned on a prepared
debug spew function would be better.
And of course, weak symbols aren't particularly portable, so this
functionality can't, for example, be used in any library or
application that is compiled on Windows as well.
How do you see this being used, specifically?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050804/7bd15207/attachment.pgp
More information about the cairo