Changes in pycairo implies segfaults

Bug #222503 reported by David Boucher on 2008-04-26
Affects Status Importance Assigned to Milestone
Fix Committed

Bug Description

In the pycairo's ChangeLog, we see this :

 * cairo/pycairo-context.c (pycairo_new): Pass 'type' as second arg to
 PycairoContext_FromContext(). This fixes the problem where Python
 subclasses of cairo.Context were not working properly.
 (PycairoContext_FromContext): Remove the support for arg #2 to be NULL,
 - its not a good 'default' since it caused the subclassing problem
 fixed above.

But, in pygoocanvas there are calls to the function PycairoContext_FromContext with NULL arg#2. This leads pygoocanvas to segfault now.

I'm a little surprised not to see someone else talking about it. I hope I don't do something bad... :-)

Any idea ?


Gustavo Carneiro (gjc) wrote :

Grr! If this is true then pycairo is being evil in breaking the API like that :-(

Gian Mario Tagliaretti (gianmt) wrote :

That's a bad API break indeed.

Gustavo do you think this will be enough to fix it?

Gustavo Carneiro (gjc) wrote :


At least for now. If anyone ever complains about using python subclassed cairo contexts in pygoocanvas we can revisit this solution :-)

Gian Mario Tagliaretti (gianmt) wrote :

Fixed in trunk, thanks.

Changed in pygoocanvas:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers