From 2d61ba089588ea70c67c146935aaf0e8a084907f Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Mon, 19 Mar 2007 01:21:12 +0000 Subject: [PATCH] gst/: Make it compilable on Python 2.4 and Python 2.5 Original commit message from CVS: * gst/common.h: * gst/gsttaglist.override: Make it compilable on Python 2.4 and Python 2.5 --- ChangeLog | 9 ++++++++- gst/common.h | 5 +++++ gst/gsttaglist.override | 8 ++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d412845..3db0641 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,14 @@ 2007-03-18 Johan Dahlin - reviewed by: Edward Hervey + * gst/common.h: + * gst/gsttaglist.override: + + Make it compilable on Python 2.4 and Python 2.5 + +2007-03-18 Johan Dahlin + reviewed by: Edward Hervey + * gst/__init__.py: Implement multiplication, divison and float coercing for fractions. diff --git a/gst/common.h b/gst/common.h index 1da5b12..528e86b 100644 --- a/gst/common.h +++ b/gst/common.h @@ -35,6 +35,11 @@ typedef destructor freefunc; #endif +#if PY_VERSION_HEX < 0x02050000 +#define ssizeargfunc intargfunc +#define ssizessizeargfunc intintargfunc +#endif + typedef struct { PyGObject *pad; GClosure *link_function; diff --git a/gst/gsttaglist.override b/gst/gsttaglist.override index 04d7e2c..9d65440 100644 --- a/gst/gsttaglist.override +++ b/gst/gsttaglist.override @@ -129,13 +129,13 @@ _wrap_gst_tag_list_contains(PyGObject *self, PyObject *py_key) static PySequenceMethods _wrap_gst_tag_list_tp_as_sequence = { (inquiry)NULL, (binaryfunc)NULL, - (intargfunc)NULL, - (intargfunc)NULL, - (intintargfunc)NULL, + (ssizeargfunc)NULL, + (ssizeargfunc)NULL, + (ssizessizeargfunc)NULL, (intobjargproc)NULL, (intintobjargproc)NULL, (objobjproc)_wrap_gst_tag_list_contains, (binaryfunc)NULL, - (intargfunc)NULL, + (ssizeargfunc)NULL, }; -- 2.7.4