[cairo] Re: cairo c++ bindings

Carl Worth cworth at cworth.org
Thu Nov 24 07:10:14 PST 2005


On Thu, 24 Nov 2005 15:13:20 +0100 (CET), "Murray Cumming" wrote:
> At the moment, it throws exceptions when a function returns a bad status.
> 
> For functions that don't return a status, maybe it should call
> *_get_status() after each call. Is that what the C coders are meant to do?

No. C coders are not meant to call _get_status repeatedly. What
happens is that if _get_status would return an error status then
basically all of that object's functions become NOOPs. That is, it is
still safe to call functions on that object and defer the _get_status
error checking until a convenient time.

If binding to a language that supports exceptions it probably does
make sense to call _get_status after each call and throw exceptions.

-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/20051124/b0229e16/attachment.pgp


More information about the cairo mailing list