All pastes #430871 Raw Edit

Mine

public text v1 · immutable
·published 2007-04-09 10:20 UTC
rendered paste body
--- gcompris-8.2.2/src/boards/canvas.c~	2006-10-03 00:46:17.000000000 +0200
+++ gcompris-8.2.2/src/boards/canvas.c	2006-12-19 12:57:06.000000000 +0100
@@ -554,7 +554,7 @@
     GType              type;
     GnomeCanvasItem   *item;
     GObjectClass      *class;
-    gint              pos = 0;
+    Py_ssize_t        pos = 0;
     PyObject          *value;
     PyObject          *key;
 
@@ -944,7 +944,7 @@
     GType              type;
     GnomeCanvasItem   *item;
     GObjectClass      *class;
-    gint              pos;
+    Py_ssize_t        pos;
     PyObject          *value;
     PyObject          *key;
 
--- gcompris-8.2.2/src/boards/py-mod-gcompris.c~	2006-11-10 23:51:55.000000000 +0100
+++ gcompris-8.2.2/src/boards/py-mod-gcompris.c	2006-12-19 13:02:58.000000000 +0100
@@ -1178,7 +1178,7 @@
   }
 
   PyObject *pykey, *pyvalue;
-  int pos = 0;
+  Py_ssize_t pos = 0;
 
   buttons_label = g_hash_table_new_full (g_str_hash,
 				    g_str_equal,
--- gcompris-8.2.2/src/boards/canvas.c~	2006-10-03 00:46:17.000000000 +0200
+++ gcompris-8.2.2/src/boards/canvas.c	2007-04-09 11:39:17.000000000 +0200
@@ -12,6 +12,11 @@
 #include <libgnomecanvas/libgnomecanvas.h>
 #include <libgnomecanvas/gnome-canvas-clipgroup.h>
 
+#if PY_VERSION_HEX < 0x02050000
+/* use int based index for python 2.4 and below */
+typedef int Py_ssize_t;
+#endif 
+
 static int
 gnomecanvasaffine_to_value(PyObject *py_affine, double affine[6])
 {
--- gcompris-8.2.2/src/boards/py-mod-gcompris.c~	2006-11-10 23:51:55.000000000 +0100
+++ gcompris-8.2.2/src/boards/py-mod-gcompris.c	2007-04-09 11:39:41.000000000 +0200
@@ -38,6 +38,11 @@
 #include "py-mod-anim.h"
 #include "py-mod-admin.h"
 
+#if PY_VERSION_HEX < 0x02050000
+/* use int based index for python 2.4 and below */
+typedef int Py_ssize_t;
+#endif 
+
 void initgnomecanvas (void);
 
 void pair_in_dict(gpointer key,