GNOME Bugzilla – Bug 415003
build warnings against python 2.5 on x86_64
Last modified: 2007-04-04 12:24:02 UTC
Python 2.5 has API changes that cause warnings in the overrides. The code generator seems to do the right thing, but the overrides need fixing. Attaching a patch that makes it build properly here, and should continue working on Python 2.4 (need a tester). The problems only show up on 64-bit builds, where sizeof (ssize_t) != sizeof (int)
Created attachment 83992 [details] [review] Define Py_ssize_t on python2.4, and use it where appropriate.
Also note these comments from #pygtk: <gjc> thaytan: you should use Py_ssize_t directly, but define Py_ssize_t for python 2.4 <gjc> thaytan: like in pygobject/gobject/pygobject-private.h <gjc> it's standard procedure, no way around it.. <thaytan> tah --> phaero (~phaero@h73n2fls31o891.telia.com) has joined #pygtk <gjc> thaytan: in fact, pygtk-codegen does that for you now, if you pass --py-ssize_t-clean ;-) <thaytan> which version? <gjc> 2.10.something I opted to define Py_ssize_t directly in gst.override, because I don't know which version of the codegen we rely on.
Can I commit this patch?
Committed with a couple of changes shown up by testing compilation against Python 2.4: * gst/common.h: * gst/gst.override: * gst/gstbuffer.override: * gst/gstcaps.override: * gst/gststructure.override: * gst/gsttaglist.override: * gst/interfaces.override: Fix the build for x86_64 when compiling against Python 2.5. Keeps backwards compatibility with Python 2.4. Tested on Ubuntu Edgy 32-bit with python 2.4 & Feisty 64-bit with Python 2.4 & 2.5 Fixes #415003.