Changes in pycairo implies segfaults

Bug #222503 reported by David Boucher
6
Affects Status Importance Assigned to Milestone
pygoocanvas
Fix Committed
Undecided
Unassigned

Bug Description

In the pycairo's ChangeLog, we see this :

2007-12-122
       [...]
 * 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 ?

Thanks
David.

Revision history for this message
Gustavo Carneiro (gjc) wrote :

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

Revision history for this message
Gian Mario Tagliaretti (gianmt) wrote :

That's a bad API break indeed.

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

Revision history for this message
Gustavo Carneiro (gjc) wrote :

Yes.

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

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.