Index: gst/gst.override
===================================================================
RCS file: /cvs/gstreamer/gst-python/gst/gst.override,v
retrieving revision 1.113
diff -u -p -u -r1.113 gst.override
--- gst/gst.override	29 Jan 2007 11:16:35 -0000	1.113
+++ gst/gst.override	5 Mar 2007 18:21:22 -0000
@@ -58,6 +58,11 @@ headers
 #include <compile.h>
 #include <frameobject.h>
 
+/* Boonky define that allows for backwards compatibility with Python 2.4 */
+#if PY_VERSION_HEX < 0x02050000 
+#define Py_ssize_t int
+#endif 
+
 GST_DEBUG_CATEGORY_EXTERN (python_debug);
 GST_DEBUG_CATEGORY_EXTERN (pygst_debug);
 #define GST_CAT_DEFAULT pygst_debug
@@ -1030,7 +1035,7 @@ gst_type_find_peek_handler (gpointer dat
 	goto beach;
     } else {
 	gchar *str;
-	int len;
+	Py_ssize_t len;
 
 	if ((PyString_AsStringAndSize(py_ret, &str, &len)) == -1) {
 	    Py_DECREF (py_ret);
Index: gst/gstbuffer.override
===================================================================
RCS file: /cvs/gstreamer/gst-python/gst/gstbuffer.override,v
retrieving revision 1.19
diff -u -p -u -r1.19 gstbuffer.override
--- gst/gstbuffer.override	11 Oct 2005 12:42:53 -0000	1.19
+++ gst/gstbuffer.override	5 Mar 2007 18:21:22 -0000
@@ -23,17 +23,20 @@
 %%
 headers
 
-static int gst_buffer_getreadbuffer (PyGstMiniObject   *self,
-				     int          index,
-				     const void **ptr);
-static int gst_buffer_getwritebuf   (PyGstMiniObject   *self,
-				     int          index,
-				     const void **ptr);
-static int gst_buffer_getsegcount   (PyGstMiniObject   *self,
-				     int         *lenp);
-static int gst_buffer_getcharbuf    (PyGstMiniObject   *self,
-				     int          index,
-				     const char **ptr);
+static Py_ssize_t gst_buffer_getreadbuffer (PyObject *self, 
+                           Py_ssize_t index, void **ptr);
+static Py_ssize_t gst_buffer_getwritebuf   (PyObject   *self,
+			   Py_ssize_t index, void **ptr);
+static Py_ssize_t gst_buffer_getsegcount   (PyObject   *self,
+			   Py_ssize_t *lenp);
+
+#if PY_VERSION_HEX >= 0x02050000
+static Py_ssize_t gst_buffer_getcharbuf    (PyObject   *self,
+			   Py_ssize_t index, char **ptr);
+#else
+static Py_ssize_t gst_buffer_getcharbuf    (PyObject   *self,
+			   Py_ssize_t index, const char **ptr);
+#endif
 %%
 override gst_buffer_new kwargs
 static int
@@ -130,14 +133,15 @@ _wrap_gst_buffer_tp_repr (PyGstMiniObjec
 %%
 override-slot GstBuffer.tp_as_buffer
 static PyBufferProcs _wrap_gst_buffer_tp_as_buffer = {
-        (getreadbufferproc)gst_buffer_getreadbuffer, /* bf_getreadbuffer */
-	(getwritebufferproc)gst_buffer_getwritebuf,  /* bf_getwritebuffer */
-	(getsegcountproc)gst_buffer_getsegcount,     /* bf_getsegcount */
-	(getcharbufferproc)gst_buffer_getcharbuf,    /* bf_getcharbuffer */
+        gst_buffer_getreadbuffer, /* bf_getreadbuffer */
+	gst_buffer_getwritebuf,  /* bf_getwritebuffer */
+	gst_buffer_getsegcount,     /* bf_getsegcount */
+	gst_buffer_getcharbuf,    /* bf_getcharbuffer */
 };
 
-static int
-gst_buffer_getreadbuffer(PyGstMiniObject *self, int index, const void **ptr)
+static Py_ssize_t
+gst_buffer_getreadbuffer(PyObject *self, Py_ssize_t index, 
+    void **ptr)
 {
 	GstBuffer *buf = pyg_boxed_get(self, GstBuffer);
 
@@ -151,8 +155,8 @@ gst_buffer_getreadbuffer(PyGstMiniObject
 	return GST_BUFFER_SIZE(buf);
 }
 
-static int
-gst_buffer_getsegcount(PyGstMiniObject *self, int *lenp)
+static Py_ssize_t
+gst_buffer_getsegcount(PyObject *self, Py_ssize_t *lenp)
 {
 	GstBuffer *buf = pyg_boxed_get(self, GstBuffer);
 
@@ -161,14 +165,23 @@ gst_buffer_getsegcount(PyGstMiniObject *
 	return 1;
 }
 
-static int
-gst_buffer_getcharbuf(PyGstMiniObject *self, int index, const char **ptr)
+/* Need a version that has const char ** for Python 2.4 */
+#if PY_VERSION_HEX >= 0x02050000
+static Py_ssize_t gst_buffer_getcharbuf    (PyObject   *self,
+			   Py_ssize_t index, char **ptr)
+{
+	return gst_buffer_getreadbuffer (self, index, (void **) ptr);
+}
+#else
+static Py_ssize_t gst_buffer_getcharbuf    (PyObject   *self,
+			   Py_ssize_t index, const char **ptr)
 {
 	return gst_buffer_getreadbuffer (self, index, (const void **) ptr);
 }
+#endif
 
-static int
-gst_buffer_getwritebuf(PyGstMiniObject *self, int index, const void **ptr)
+static Py_ssize_t
+gst_buffer_getwritebuf(PyObject *self, Py_ssize_t index, void **ptr)
 {
 	GstBuffer *buf = pyg_boxed_get(self, GstBuffer);
 
@@ -192,14 +205,14 @@ gst_buffer_getwritebuf(PyGstMiniObject *
 override-slot GstBuffer.tp_as_sequence
 /* FIXME: should buffer parts be buffers or strings? */
 
-static int
+static Py_ssize_t
 pygst_buffer_length(PyObject *self)
 {
 	return GST_BUFFER_SIZE(pygobject_get (self));
 }
 
 static PyObject *
-pygst_buffer_slice(PyObject *self, int start, int end)
+pygst_buffer_slice(PyObject *self, Py_ssize_t start, Py_ssize_t end)
 {
   GstBuffer *buf = GST_BUFFER (pygobject_get (self));
   if (start < 0)
@@ -217,17 +230,18 @@ pygst_buffer_slice(PyObject *self, int s
 }
 
 static PyObject *
-pygst_buffer_item(PyObject *self, int index)
+pygst_buffer_item(PyObject *self, Py_ssize_t index)
 {
   return pygst_buffer_slice (self, index, index + 1);
 }
 
 static int
-pygst_buffer_ass_slice (PyObject *self, int start, int end, PyObject *val)
+pygst_buffer_ass_slice (PyObject *self, Py_ssize_t start, 
+        Py_ssize_t end, PyObject *val)
 {
   GstBuffer *buf = GST_BUFFER (pygobject_get (self));
   const void *data;
-  int len;
+  Py_ssize_t len;
 
   if (!gst_buffer_is_writable (buf)) {
     PyErr_SetString(PyExc_TypeError, "buffer is not writable");
@@ -248,11 +262,11 @@ pygst_buffer_ass_slice (PyObject *self, 
 }
 
 static int
-pygst_buffer_ass_item (PyObject *self, int index, PyObject *val)
+pygst_buffer_ass_item (PyObject *self, Py_ssize_t index, PyObject *val)
 {
   GstBuffer *buf = GST_BUFFER (pygobject_get (self));
   const void *data;
-  int len;
+  Py_ssize_t len;
 
   if (!gst_buffer_is_writable (buf)) {
     PyErr_SetString(PyExc_TypeError, "buffer is not writable");
Index: gst/gstcaps.override
===================================================================
RCS file: /cvs/gstreamer/gst-python/gst/gstcaps.override,v
retrieving revision 1.8
diff -u -p -u -r1.8 gstcaps.override
--- gst/gstcaps.override	6 Oct 2005 15:03:40 -0000	1.8
+++ gst/gstcaps.override	5 Mar 2007 18:21:23 -0000
@@ -77,7 +77,7 @@ ignore
   gst_caps_set_simple
 %%
 override gst_caps_get_structure kwargs
-static PyObject *pygst_caps_sq_item(PyObject *self, int i);
+static PyObject *pygst_caps_sq_item(PyObject *self, Py_ssize_t i);
 static PyObject *
 _wrap_gst_caps_get_structure(PyObject *self, PyObject *args, PyObject *kwargs)
 {
@@ -349,7 +349,7 @@ static PyNumberMethods _wrap_gst_caps_tp
 };
 %%
 override-slot GstCaps.tp_as_sequence
-static int
+static Py_ssize_t
 pygst_caps_sq_length(PyObject *self)
 {
 	GstCaps *caps = pyg_boxed_get (self, GstCaps);
@@ -357,7 +357,7 @@ pygst_caps_sq_length(PyObject *self)
 }
 
 static PyObject *
-pygst_caps_sq_item(PyObject *self, int i)
+pygst_caps_sq_item(PyObject *self, Py_ssize_t i)
 {
 	GstCaps *caps = pyg_boxed_get (self, GstCaps);
 	GstStructure *structure;
@@ -381,7 +381,7 @@ pygst_caps_sq_item(PyObject *self, int i
 
 /* FIXME: This syntax sucks */
 static PyObject *
-pygst_caps_sq_slice(PyObject *self, int start, int end)
+pygst_caps_sq_slice(PyObject *self, Py_ssize_t start, Py_ssize_t end)
 {
 	GstCaps *caps = pyg_boxed_get (self, GstCaps);
 	GstCaps *ret = gst_caps_new_empty ();
Index: gst/gststructure.override
===================================================================
RCS file: /cvs/gstreamer/gst-python/gst/gststructure.override,v
retrieving revision 1.11
diff -u -p -u -r1.11 gststructure.override
--- gst/gststructure.override	6 Mar 2006 16:24:53 -0000	1.11
+++ gst/gststructure.override	5 Mar 2007 18:21:23 -0000
@@ -172,10 +172,11 @@ _wrap_gst_structure_keys (PyObject *self
 
 %%
 override-slot GstStructure.tp_as_mapping
-static int
-_wrap_gst_structure_length(PyGObject *self)
+static Py_ssize_t
+_wrap_gst_structure_length(PyObject *self)
 {
-	return gst_structure_n_fields((GstStructure*)self->obj);
+        PyGObject *gself = (PyGObject *)self;
+	return gst_structure_n_fields((GstStructure*)gself->obj);
 }
 
 static PyObject *
@@ -222,7 +223,7 @@ _wrap_gst_structure_ass_subscript(PyGObj
 }
 
 static PyMappingMethods _wrap_gst_structure_tp_as_mapping = {
-	(inquiry)_wrap_gst_structure_length,         /* mp_length */
+	_wrap_gst_structure_length,         /* mp_length */
 	(binaryfunc)_wrap_gst_structure_subscript,   /* mp_subscript */
 	(objobjargproc)_wrap_gst_structure_ass_subscript /* mp_ass_subscript */
 };
Index: gst/gsttaglist.override
===================================================================
RCS file: /cvs/gstreamer/gst-python/gst/gsttaglist.override,v
retrieving revision 1.6
diff -u -p -u -r1.6 gsttaglist.override
--- gst/gsttaglist.override	10 Apr 2006 14:47:19 -0000	1.6
+++ gst/gsttaglist.override	5 Mar 2007 18:21:23 -0000
@@ -63,10 +63,11 @@ _wrap_gst_tag_list_keys(PyGObject *self)
 }
 %%
 override-slot GstTagList.tp_as_mapping
-static int
-_wrap_gst_tag_list_length(PyGObject *self)
+static Py_ssize_t
+_wrap_gst_tag_list_length(PyObject *self)
 {
-	return gst_structure_n_fields((GstStructure*)self->obj);
+	PyGObject *gself = (PyGObject *)self;
+	return gst_structure_n_fields((GstStructure*)gself->obj);
 }
 
 static PyObject *
@@ -113,7 +114,7 @@ _wrap_gst_tag_list_ass_subscript(PyGObje
 }
 
 static PyMappingMethods _wrap_gst_tag_list_tp_as_mapping = {
-	(inquiry)_wrap_gst_tag_list_length,         /* mp_length */
+	_wrap_gst_tag_list_length,         /* mp_length */
 	(binaryfunc)_wrap_gst_tag_list_subscript,   /* mp_subscript */
 	(objobjargproc)_wrap_gst_tag_list_ass_subscript /* mp_ass_subscript */
 };
Index: gst/interfaces.override
===================================================================
RCS file: /cvs/gstreamer/gst-python/gst/interfaces.override,v
retrieving revision 1.20
diff -u -p -u -r1.20 interfaces.override
--- gst/interfaces.override	4 Feb 2007 10:44:40 -0000	1.20
+++ gst/interfaces.override	5 Mar 2007 18:21:23 -0000
@@ -188,7 +188,7 @@ _wrap_gst_mixer_set_volume (PyGObject *s
     if (channels != PyTuple_Size (py_tuple)) {
       PyErr_Format (PyExc_TypeError,
           "Track channel count %d != volume tuple size %d",
-          channels, PyTuple_Size (py_tuple));
+          channels, (gint) PyTuple_Size (py_tuple));
       return NULL;
     }
 
