[Cairo] another set of Python bindings
Carl Worth
cworth at east.isi.edu
Mon Sep 15 13:31:53 PDT 2003
On Sep 12, James Henstridge wrote:
> By exposing reference counting operations on cairo_t objects, this
> particular case would be easy to handle, so that neither the Python code
> or C code destroy the cairo_t object until both are finished with it.
>
> A similar argument goes for surfaces.
James,
Thanks for the suggestion.
I'm quite open to this idea. Internally cairo_surface_t already has a
reference count, so we can expose a function to increment that. The
cairo_t object doesn't need one internally, but I'm willing to concede
the addition of the couple of lines of code in order to help the
layers above.
So the two new API calls would be:
void
cairo_reference (cairo_t *cr);
void
cairo_surface_reference (cairo_surface_t *surface);
Any objections?
-Carl
More information about the cairo
mailing list