[cairo] Re: cairo c++ bindings
Rui Pires
themidgard at gmail.com
Thu Nov 24 07:49:34 PST 2005
On 11/24/05, Carl Worth <cworth at cworth.org> wrote:
>
> 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
>
>
I don't know if anyone else agrees with me, but I think the idea of having
the wrapper be configurable with a policy to handle the errors is highly
attractive.
The alternative would be to have a bool checkForErrors and check if before
checking and handling errors. This would imply run-time overhead, while
using the policies would not.
What do you think ?
Rui Pires
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/cairo/attachments/20051124/11fa9e13/attachment.html
More information about the cairo
mailing list