Bug 7180 - pycairo wraps nonexistent (changed) API
Summary: pycairo wraps nonexistent (changed) API
Status: RESOLVED FIXED
Alias: None
Product: pycairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Steve Chaplin
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-10 14:12 UTC by Elijah Newren
Modified: 2006-06-11 00:29 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Hacky patch to fix the bug (1.23 KB, patch)
2006-06-10 15:23 UTC, Elijah Newren
Details | Splinter Review
replace *Surface set_dpi method by Surface set_fallback_resolution (3.53 KB, patch)
2006-06-10 23:08 UTC, Frederic Peters
Details | Splinter Review

Description Elijah Newren 2006-06-10 14:12:28 UTC
pycairo wraps cairo_ps_surface_set_dpi, but cairo/src/cairo.h now #defines that
function to
cairo_ps_surface_set_dpi_REPLACED_BY_cairo_surface_set_fallback_resolution,
without defining this new function.  It appears to be part of a cairo effort to
force people to move to the new API.  (See also
http://bugzilla.gnome.org/show_bug.cgi?id=344512)

1032 newren@Moe:gnome/PolicyKit$ jhbuild shell
1001 newren@Moe:gnome/PolicyKit$ python
Python 2.4.3 (#1, Jun 10 2006, 15:32:32)
[GCC 3.4.4 20050721 (Red Hat 3.4.4-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/opt/gnome2/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line
43, in ?
    from _gtk import *
  File "/opt/gnome2/lib/python2.4/site-packages/cairo/__init__.py", line 1, in ?
    from _cairo import *
ImportError: /opt/gnome2/lib/python2.4/site-packages/cairo/_cairo.so: undefined
symbol: cairo_ps_surface_set_dpi_REPLACED_BY_cairo_surface_set_fallback_resolution
Comment 1 Elijah Newren 2006-06-10 15:23:51 UTC
Created attachment 5871 [details] [review]
Hacky patch to fix the bug

This patch takes the minimal route to fixing this bug.	Probably not the best
route, as you'd probably want to compress the three pycairo functions into one
just as cairo did.
Comment 2 Frederic Peters 2006-06-10 23:08:38 UTC
Created attachment 5874 [details] [review]
replace *Surface set_dpi method by Surface set_fallback_resolution

This patch does it like cairo did; providing set_fallback_resolution to
CairoSurface instead of three set_dpi methods to children classes.
Comment 3 Steve Chaplin 2006-06-11 00:29:04 UTC
Fixed in CVS using the method from the second patch. (I received the email
regarding the second patch after I had just made the equivalent changes!)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.