[Cairo] another set of Python bindings

James Henstridge james at daa.com.au
Mon Sep 15 21:23:06 PDT 2003

On 16/09/2003 4:31 AM, Carl Worth wrote:

>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.
>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?
Sounds good.  In case you are interested in shorter names for those 
APIs, the three names I've run into most are "addref", "incref" and just 


Email: james at daa.com.au
WWW:   http://www.daa.com.au/~james/

More information about the cairo mailing list