Gentoo Archives: gentoo-commits

From: "Santiago M. Mola (coldwind)" <coldwind@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/pygame/files: pygame-1.7.1-python2.5.patch
Date: Fri, 20 Jun 2008 17:53:43
Message-Id: E1K9knp-0004uH-Ls@stork.gentoo.org
1 coldwind 08/06/20 17:53:37
2
3 Added: pygame-1.7.1-python2.5.patch
4 Log:
5 Fix bug with python 2.5 and amd64, bug #194932. Remove old rc.
6 (Portage version: 2.2_pre8/cvs/Linux 2.6.25-gentoo-r3 x86_64)
7
8 Revision Changes Path
9 1.1 dev-python/pygame/files/pygame-1.7.1-python2.5.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/pygame/files/pygame-1.7.1-python2.5.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/pygame/files/pygame-1.7.1-python2.5.patch?rev=1.1&content-type=text/plain
13
14 Index: pygame-1.7.1-python2.5.patch
15 ===================================================================
16 --- src/image.c.old 2005-03-13 02:12:35.000000000 +0100
17 +++ src/image.c 2007-03-14 21:09:30.000000000 +0100
18 @@ -291,7 +291,8 @@
19 PyObject *surfobj, *string=NULL;
20 char *format, *data, *pixels;
21 SDL_Surface *surf, *temp=NULL;
22 - int w, h, color, len, flipped=0;
23 + int w, h, color, flipped=0;
24 + Py_ssize_t len;
25 int Rmask, Gmask, Bmask, Amask, Rshift, Gshift, Bshift, Ashift, Rloss, Gloss, Bloss, Aloss;
26 int hascolorkey, colorkey;
27
28 @@ -331,7 +332,7 @@
29 }
30 else if(!strcmp(format, "RGB"))
31 {
32 - string = PyString_FromStringAndSize(NULL, surf->w*surf->h*3);
33 + string = PyString_FromStringAndSize(NULL, (Py_ssize_t)surf->w*surf->h*3);
34 if(!string)
35 return NULL;
36 PyString_AsStringAndSize(string, &data, &len);
37 @@ -407,7 +408,7 @@
38 if(strcmp(format, "RGBA"))
39 hascolorkey = 0;
40
41 - string = PyString_FromStringAndSize(NULL, surf->w*surf->h*4);
42 + string = PyString_FromStringAndSize(NULL, (Py_ssize_t)surf->w*surf->h*4);
43 if(!string)
44 return NULL;
45 PyString_AsStringAndSize(string, &data, &len);
46 @@ -605,7 +606,8 @@
47 PyObject *string;
48 char *format, *data;
49 SDL_Surface *surf = NULL;
50 - int w, h, len, flipped=0;
51 + int w, h, flipped=0;
52 + Py_ssize_t len;
53 int loopw, looph;
54
55 if(!PyArg_ParseTuple(arg, "O!(ii)s|i", &PyString_Type, &string, &w, &h, &format, &flipped))
56 @@ -729,7 +731,8 @@
57 PyObject *buffer;
58 char *format, *data;
59 SDL_Surface *surf = NULL;
60 - int w, h, len;
61 + int w, h;
62 + Py_ssize_t len;
63 PyObject *surfobj;
64
65 if(!PyArg_ParseTuple(arg, "O(ii)s|i", &buffer, &w, &h, &format))
66
67
68
69 --
70 gentoo-commits@l.g.o mailing list