Hello community,
here is the log from the commit of package python-pygame
checked in at Fri Apr 4 01:44:15 CEST 2008.
--------
--- python-pygame/python-pygame.changes 2007-08-21 21:14:54.000000000 +0200
+++ /mounts/work_src_done/STABLE/python-pygame/python-pygame.changes 2008-04-03 16:16:42.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Apr 3 16:15:37 CEST 2008 - prusnak@suse.cz
+
+- updated to 1.8.0
+ * lots of changes and fixes - see WHATSNEW for details
+- rewrite pep353.diff
+
+-------------------------------------------------------------------
Old:
----
pygame-1.7.1release.tar.bz2
python-pygame-1.7.1release-pep353.diff
New:
----
pygame-1.8.0release.tar.bz2
python-pygame-1.8.0-pep353.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pygame.spec ++++++
--- /var/tmp/diff_new_pack.Em4022/_old 2008-04-04 01:44:04.000000000 +0200
+++ /var/tmp/diff_new_pack.Em4022/_new 2008-04-04 01:44:04.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package python-pygame (Version 1.7.1release)
+# spec file for package python-pygame (Version 1.8.0)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -10,20 +10,21 @@
# norootforbuild
+
Name: python-pygame
BuildRequires: SDL_image-devel SDL_mixer-devel SDL_ttf-devel python-devel python-numeric xorg-x11
-Version: 1.7.1release
-Release: 105
-Source: pygame-%{version}.tar.bz2
+Version: 1.8.0
+Release: 1
+Source: pygame-%{version}release.tar.bz2
Source1: README.SuSE
Patch0: %{name}-%{version}-pep353.diff
Summary: A Python Module for Interfacing with the SDL Multimedia Library
-License: LGPL v2 or later
+License: LGPL v2.1 or later
Group: Development/Libraries/Python
-URL: http://www.pygame.org/
+Url: http://www.pygame.org/
Provides: pygame
Obsoletes: pygame
-Autoreqprov: on
+AutoReqProv: on
%{py_requires}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -42,14 +43,15 @@
Pete Shinners
%package doc
-Summary: pygame documentation and example programs
+License: LGPL v2.1 or later
+Summary: Pygame documentation and example programs
Group: Development/Libraries/Python
Provides: pygame-doc
Obsoletes: pygame-doc
-Requires: python-pygame = %version-%release
+Requires: python-pygame = %{version}
%description doc
-pygame is a Python wrapper module for the SDL multimedia library. It
+Pygame is a Python wrapper module for the SDL multimedia library. It
contains python functions and classes that will allow you to use SDL's
support for playing cdroms, audio and video output, and keyboard, mouse
and joystick input. pygame also includes support for the Numerical
@@ -63,7 +65,7 @@
Pete Shinners
%prep
-%setup -n pygame-%{version}
+%setup -q -n pygame-%{version}release
%patch0
%build
@@ -94,51 +96,55 @@
%doc %{_docdir}/python-pygame/examples
%changelog
-* Tue Aug 21 2007 - meissner@suse.de
+* Thu Apr 03 2008 prusnak@suse.cz
+- updated to 1.8.0
+ * lots of changes and fixes - see WHATSNEW for details
+- rewrite pep353.diff
+* Tue Aug 21 2007 meissner@suse.de
- buildrequire SDL_ttf -> SDL_ttf-devel
-* Tue Nov 21 2006 - prusnak@suse.cz
+* Tue Nov 21 2006 prusnak@suse.cz
- changes according to PEP353 (pep353.diff)
-* Tue Feb 28 2006 - jmatejek@suse.cz
+* Tue Feb 28 2006 jmatejek@suse.cz
- updated to reflect python changes due to #149809
-* Wed Jan 25 2006 - mls@suse.de
+* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
-* Thu Oct 06 2005 - matejcik@suse.cz
+* Thu Oct 06 2005 matejcik@suse.cz
- update to 1.7.1release
- removed readme.html, which is no longer provided
-* Wed Feb 02 2005 - ro@suse.de
+* Wed Feb 02 2005 ro@suse.de
- fix build
-* Tue Sep 21 2004 - mcihar@suse.cz
+* Tue Sep 21 2004 mcihar@suse.cz
- update to 1.6.2, this (among others) fixes brokeness on x86_64 - bug #45731
-* Fri Jan 30 2004 - mcihar@suse.cz
+* Fri Jan 30 2004 mcihar@suse.cz
- fixed documentation installation
-* Fri Oct 24 2003 - mcihar@suse.cz
+* Fri Oct 24 2003 mcihar@suse.cz
- update to 1.6 (This new release mainly contains stability and internal
fixes, small fixes for line and circle primitives, many fixes for locating
system TrueType fonts, an updated Mac OS X environment, and bigger integer
storage for Rect objects.)
- patch was included in upstream
- no root for build
-* Thu Oct 02 2003 - mcihar@suse.cz
+* Thu Oct 02 2003 mcihar@suse.cz
- fixed mode related functions that failed on AMD64, thanks to gpayer@suse.de (bug #31709)
-* Mon Jun 16 2003 - mcihar@suse.cz
+* Mon Jun 16 2003 mcihar@suse.cz
- use record-rpm
- updated to 1.5.6
-* Mon May 12 2003 - mcihar@suse.cz
+* Mon May 12 2003 mcihar@suse.cz
- use versioned dependency on python
-* Wed Jan 08 2003 - mcihar@suse.cz
+* Wed Jan 08 2003 mcihar@suse.cz
- added obsoletes and provides for rename
- moved doc into %%{_defaultdocdir}/python-pygame
- some doc is in base package with info where to find more
-* Mon Jan 06 2003 - mcihar@suse.cz
+* Mon Jan 06 2003 mcihar@suse.cz
- update to 1.5.5
* improved Unicode support
* fixed some bugs
- renamed to python-pygame
-* Mon Aug 12 2002 - ro@suse.de
+* Mon Aug 12 2002 ro@suse.de
- update to 1.5 to get rid of conflict with pause() from unistd
-* Mon Feb 18 2002 - vinil@suse.cz
+* Mon Feb 18 2002 vinil@suse.cz
- pygame now requires python
-* Mon Feb 04 2002 - nadvornik@suse.cz
+* Mon Feb 04 2002 nadvornik@suse.cz
- update to 1.4
-* Tue Jan 29 2002 - nadvornik@suse.cz
+* Tue Jan 29 2002 nadvornik@suse.cz
- new package, version 1.3
++++++ pygame-1.7.1release.tar.bz2 -> pygame-1.8.0release.tar.bz2 ++++++
++++ 77032 lines of diff (skipped)
++++++ python-pygame-1.7.1release-pep353.diff -> python-pygame-1.8.0-pep353.diff ++++++
--- python-pygame/python-pygame-1.7.1release-pep353.diff 2006-11-21 11:10:37.000000000 +0100
+++ /mounts/work_src_done/STABLE/python-pygame/python-pygame-1.8.0-pep353.diff 2008-04-03 14:50:48.000000000 +0200
@@ -1,64 +1,64 @@
--- src/base.c
+++ src/base.c
-@@ -155,7 +155,7 @@
- static PyObject* init(PyObject* self,PyObject* args)
+@@ -117,7 +117,7 @@
+ init (PyObject* self)
{
- PyObject *allmodules, *moduleslist, *dict, *func, *result, *mod;
-- int loop, num;
-+ Py_ssize_t loop, num;
- int success=0, fail=0;
-
- if(!PyArg_ParseTuple(args, ""))
-@@ -215,7 +215,7 @@
- {
- PyObject* quit;
- PyObject* privatefuncs;
-- int num;
-+ Py_ssize_t num;
-
- if(!quitfunctions)
- return;
-@@ -414,7 +414,7 @@
-
- static int RGBAFromObj(PyObject* obj, Uint8* RGBA)
- {
-- int length;
-+ Py_ssize_t length;
- Uint32 val;
- if(PyTuple_Check(obj) && PyTuple_Size(obj)==1)
- return RGBAFromObj(PyTuple_GET_ITEM(obj, 0), RGBA);
+ PyObject *allmodules, *moduleslist, *dict, *func, *result, *mod;
+- int loop, num;
++ Py_ssize_t loop, num;
+ int success=0, fail=0;
+
+ if (!CheckSDLVersions ())
+@@ -175,7 +175,7 @@
+ {
+ PyObject* quit;
+ PyObject* privatefuncs;
+- int num;
++ Py_ssize_t num;
+
+ if (!quitfunctions)
+ return;
+@@ -345,7 +345,7 @@
+ static int
+ RGBAFromObj (PyObject* obj, Uint8* RGBA)
+ {
+- int length;
++ Py_ssize_t length;
+ Uint32 val;
+ if (PyTuple_Check (obj) && PyTuple_Size (obj) == 1)
+ return RGBAFromObj (PyTuple_GET_ITEM (obj, 0), RGBA);
--- src/display.c
+++ src/display.c
-@@ -895,7 +895,7 @@
- {
- PyObject* seq;
- PyObject* r;
-- int loop, num, count;
-+ Py_ssize_t loop, num, count;
- SDL_Rect* rects;
- if(PyTuple_Size(arg) != 1)
- return RAISE(PyExc_ValueError, "update requires a rectstyle or sequence of recstyles");
-@@ -966,7 +966,7 @@
- SDL_Palette* pal;
- SDL_Color* colors;
- PyObject* list, *item = NULL;
-- int i, len;
-+ Py_ssize_t i, len;
- int r, g, b;
-
- VIDEO_INIT_CHECK();
-@@ -991,7 +991,7 @@
- if(!PySequence_Check(list))
- return RAISE(PyExc_ValueError, "Argument must be a sequence type");
+@@ -685,7 +685,7 @@
+ {
+ PyObject* seq;
+ PyObject* r;
+- int loop, num, count;
++ Py_ssize_t loop, num, count;
+ SDL_Rect* rects;
+ if (PyTuple_Size (arg) != 1)
+ return RAISE
+@@ -750,7 +750,7 @@
+ SDL_Palette* pal;
+ SDL_Color* colors;
+ PyObject* list, *item = NULL;
+- int i, len;
++ Py_ssize_t i, len;
+ int r, g, b;
+
+ VIDEO_INIT_CHECK ();
+@@ -774,7 +774,7 @@
+ if (!PySequence_Check (list))
+ return RAISE (PyExc_ValueError, "Argument must be a sequence type");
-- len = min(pal->ncolors, PySequence_Length(list));
-+ len = min((Py_ssize_t)pal->ncolors, PySequence_Length(list));
+- len = MIN (pal->ncolors, PySequence_Length (list));
++ len = MIN ((Py_ssize_t)pal->ncolors, PySequence_Length (list));
- colors = (SDL_Color*)malloc(len * sizeof(SDL_Color));
- if(!colors)
+ colors = (SDL_Color*)malloc (len * sizeof (SDL_Color));
+ if (!colors)
--- src/draw.c
+++ src/draw.c
-@@ -240,7 +240,8 @@
+@@ -196,7 +196,8 @@
Uint8 rgba[4];
Uint32 color;
int closed, blend;
@@ -68,7 +68,7 @@
float startx, starty;
/*get all the arguments*/
-@@ -347,7 +348,8 @@
+@@ -285,7 +286,8 @@
Uint8 rgba[4];
Uint32 color;
int closed;
@@ -78,7 +78,7 @@
int startx, starty;
/*get all the arguments*/
-@@ -658,7 +660,8 @@
+@@ -536,7 +538,8 @@
SDL_Surface* surf;
Uint8 rgba[4];
Uint32 color;
@@ -90,272 +90,164 @@
--- src/event.c
+++ src/event.c
-@@ -424,7 +424,7 @@
- (unaryfunc)NULL, /*negative*/
- (unaryfunc)NULL, /*pos*/
- (unaryfunc)NULL, /*abs*/
-- (inquiry)event_nonzero, /*nonzero*/
-+ (lenfunc)event_nonzero, /*nonzero*/
- (unaryfunc)NULL, /*invert*/
- (binaryfunc)NULL, /*lshift*/
- (binaryfunc)NULL, /*rshift*/
-@@ -534,7 +534,7 @@
- if(keywords)
- {
- PyObject *key, *value;
-- int pos = 0;
-+ Py_ssize_t pos = 0;
- while(PyDict_Next(keywords, &pos, &key, &value))
- PyDict_SetItem(dict, key, value);
- }
-@@ -721,7 +721,7 @@
- {
- SDL_Event event;
- int mask = 0;
-- int loop, num;
-+ Py_ssize_t loop, num;
- PyObject* type;
- int val;
-
-@@ -776,7 +776,7 @@
- {
- SDL_Event event;
- int mask = 0;
-- int loop, num;
-+ Py_ssize_t loop, num;
- PyObject* type, *list, *e;
- int val;
-
-@@ -846,7 +846,7 @@
- SDL_Event event;
- int result;
- int mask = 0;
-- int loop, num, noargs=0;
-+ Py_ssize_t loop, num, noargs=0;
- PyObject* type;
- int val;
-
-@@ -934,7 +934,7 @@
-
- static PyObject* set_allowed(PyObject* self, PyObject* args)
- {
-- int loop, num;
-+ Py_ssize_t loop, num;
- PyObject* type;
- int val;
-
-@@ -978,7 +978,7 @@
-
- static PyObject* set_blocked(PyObject* self, PyObject* args)
- {
-- int loop, num;
-+ Py_ssize_t loop, num;
- PyObject* type;
- int val;
-
-@@ -1020,7 +1020,7 @@
-
- static PyObject* get_blocked(PyObject* self, PyObject* args)
- {
-- int loop, num;
-+ Py_ssize_t loop, num;
- PyObject* type;
- int val;
- int isblocked = 0;
---- src/image.c
-+++ src/image.c
-@@ -291,7 +291,8 @@
- PyObject *surfobj, *string=NULL;
- char *format, *data, *pixels;
- SDL_Surface *surf, *temp=NULL;
-- int w, h, color, len, flipped=0;
-+ int w, h, color, flipped=0;
-+ Py_ssize_t len;
- int Rmask, Gmask, Bmask, Amask, Rshift, Gshift, Bshift, Ashift, Rloss, Gloss, Bloss, Aloss;
- int hascolorkey, colorkey;
-
-@@ -605,7 +606,8 @@
- PyObject *string;
- char *format, *data;
- SDL_Surface *surf = NULL;
-- int w, h, len, flipped=0;
-+ int w, h, flipped=0;
-+ Py_ssize_t len;
- int loopw, looph;
-
- if(!PyArg_ParseTuple(arg, "O!(ii)s|i", &PyString_Type, &string, &w, &h, &format, &flipped))
-@@ -729,8 +731,9 @@
- PyObject *buffer;
- char *format, *data;
- SDL_Surface *surf = NULL;
-- int w, h, len;
-- PyObject *surfobj;
-+ int w, h;
-+ PyObject *surfobj;
-+ Py_ssize_t len;
-
- if(!PyArg_ParseTuple(arg, "O(ii)s|i", &buffer, &w, &h, &format))
- return NULL;
+@@ -428,7 +428,7 @@
+ (unaryfunc)NULL, /*negative*/
+ (unaryfunc)NULL, /*pos*/
+ (unaryfunc)NULL, /*abs*/
+- (inquiry)event_nonzero, /*nonzero*/
++ (lenfunc)event_nonzero, /*nonzero*/
+ (unaryfunc)NULL, /*invert*/
+ (binaryfunc)NULL, /*lshift*/
+ (binaryfunc)NULL, /*rshift*/
+@@ -614,7 +614,7 @@
+ {
+ SDL_Event event;
+ int mask = 0;
+- int loop, num;
++ Py_ssize_t loop, num;
+ PyObject* type;
+ int val;
+
+@@ -660,7 +660,7 @@
+ {
+ SDL_Event event;
+ int mask = 0;
+- int loop, num;
++ Py_ssize_t loop, num;
+ PyObject* type, *list, *e;
+ int val;
+
+@@ -720,7 +720,7 @@
+ SDL_Event event;
+ int result;
+ int mask = 0;
+- int loop, num, noargs=0;
++ Py_ssize_t loop, num, noargs=0;
+ PyObject* type;
+ int val;
+
+@@ -793,7 +793,7 @@
+ static PyObject*
+ set_allowed (PyObject* self, PyObject* args)
+ {
+- int loop, num;
++ Py_ssize_t loop, num;
+ PyObject* type;
+ int val;
+
+@@ -833,7 +833,7 @@
+ static PyObject*
+ set_blocked (PyObject* self, PyObject* args)
+ {
+- int loop, num;
++ Py_ssize_t loop, num;
+ PyObject* type;
+ int val;
+
+@@ -873,7 +873,7 @@
+ static PyObject*
+ get_blocked (PyObject* self, PyObject* args)
+ {
+- int loop, num;
++ Py_ssize_t loop, num;
+ PyObject* type;
+ int val;
+ int isblocked = 0;
--- src/mouse.c
+++ src/mouse.c
-@@ -202,7 +202,7 @@
- int w, h, spotx, spoty;
- PyObject *xormask, *andmask;
- Uint8 *xordata=NULL, *anddata=NULL;
-- int xorsize, andsize, loop;
-+ Py_ssize_t xorsize, andsize, loop;
- int val;
- SDL_Cursor *lastcursor, *cursor = NULL;
+@@ -108,7 +108,7 @@
+ int w, h, spotx, spoty;
+ PyObject *xormask, *andmask;
+ Uint8 *xordata=NULL, *anddata=NULL;
+- int xorsize, andsize, loop;
++ Py_ssize_t xorsize, andsize, loop;
+ int val;
+ SDL_Cursor *lastcursor, *cursor = NULL;
--- src/rect.c
+++ src/rect.c
-@@ -323,7 +323,7 @@
+@@ -284,7 +284,7 @@
{
- PyRectObject* self = (PyRectObject*)oself;
- GAME_Rect *argrect, temp;
-- int loop, size;
-+ Py_ssize_t loop, size;
- PyObject* list, *obj;
- int t, l, b, r;
-
-@@ -372,7 +372,7 @@
- {
- PyRectObject* self = (PyRectObject*)oself;
- GAME_Rect *argrect, temp;
-- int loop, size;
-+ Py_ssize_t loop, size;
- PyObject* list, *obj;
- int t, l, b, r;
-
-@@ -475,7 +475,7 @@
- {
- PyRectObject* self = (PyRectObject*)oself;
- GAME_Rect *argrect, temp;
-- int loop, size;
-+ Py_ssize_t loop, size;
- PyObject* list, *obj;
- PyObject* ret = NULL;
-
-@@ -525,7 +525,7 @@
- {
- PyRectObject* self = (PyRectObject*)oself;
- GAME_Rect *argrect, temp;
-- int loop, size;
-+ Py_ssize_t loop, size;
- PyObject* list, *obj;
- PyObject* ret = NULL;
-
-@@ -589,7 +589,7 @@
- {
- PyRectObject* self = (PyRectObject*)oself;
- GAME_Rect *argrect, temp;
-- int loop=0;
-+ Py_ssize_t loop=0;
- PyObject* dict, *key, *val;
- PyObject* ret = NULL;
-
-@@ -598,7 +598,7 @@
- if(!PyDict_Check(dict))
- return RAISE(PyExc_TypeError, "Argument must be a dict with rectstyle keys.");
-
-- while(PyDict_Next(dict, &loop, &key, &val))
-+ while(PyDict_Next(dict, &loop, &key, &val))
- {
- if(!(argrect = GameRect_FromObject(key, &temp)))
- {
-@@ -640,7 +640,7 @@
- {
- PyRectObject* self = (PyRectObject*)oself;
- GAME_Rect *argrect, temp;
-- int loop=0;
-+ Py_ssize_t loop=0;
- PyObject* dict, *key, *val;
- PyObject* ret = NULL;
-
-@@ -653,7 +653,7 @@
- if(!ret)
- return NULL;
-
-- while(PyDict_Next(dict, &loop, &key, &val))
-+ while(PyDict_Next(dict, &loop, &key, &val))
- {
- if(!(argrect = GameRect_FromObject(key, &temp)))
- {
-@@ -974,7 +974,8 @@
- {
- PyObject *list;
- int* data = (int*)&self->r;
-- int numitems, loop, l = 4;
-+ Py_ssize_t numitems, loop;
-+ int l = 4;
-
- if (ihigh < 0) ihigh += l;
- if (ilow < 0) ilow += l;
-@@ -997,7 +998,8 @@
- static int rect_ass_slice(PyRectObject *self, int ilow, int ihigh, PyObject *v)
- {
- int* data = (int*)&self->r;
-- int numitems, loop, l = 4;
-+ Py_ssize_t numitems, loop;
-+ int l = 4;
- int val;
-
- if(!PySequence_Check(v))
-@@ -1031,13 +1033,13 @@
- }
-
- static PySequenceMethods rect_as_sequence = {
-- (inquiry)rect_length, /*length*/
-+ (lenfunc)rect_length, /*length*/
- (binaryfunc)NULL, /*concat*/
-- (intargfunc)NULL, /*repeat*/
-- (intargfunc)rect_item, /*item*/
-- (intintargfunc)rect_slice, /*slice*/
-- (intobjargproc)rect_ass_item, /*ass_item*/
-- (intintobjargproc)rect_ass_slice, /*ass_slice*/
-+ (ssizeargfunc)NULL, /*repeat*/
-+ (ssizeargfunc)rect_item, /*item*/
-+ (ssizessizeargfunc)rect_slice, /*slice*/
-+ (ssizeobjargproc)rect_ass_item, /*ass_item*/
-+ (ssizessizeobjargproc)rect_ass_slice, /*ass_slice*/
- };
-
-
-@@ -1094,7 +1096,7 @@
- (unaryfunc)NULL, /*negative*/
- (unaryfunc)NULL, /*pos*/
- (unaryfunc)NULL, /*abs*/
-- (inquiry)rect_nonzero, /*nonzero*/
-+ (lenfunc)rect_nonzero, /*nonzero*/
- (unaryfunc)NULL, /*invert*/
- (binaryfunc)NULL, /*lshift*/
- (binaryfunc)NULL, /*rshift*/
+ PyRectObject* self = (PyRectObject*)oself;
+ GAME_Rect *argrect, temp;
+- int loop, size;
++ Py_ssize_t loop, size;
+ PyObject* list, *obj;
+ int t, l, b, r;
+
+@@ -326,7 +326,7 @@
+ {
+ PyRectObject* self = (PyRectObject*)oself;
+ GAME_Rect *argrect, temp;
+- int loop, size;
++ Py_ssize_t loop, size;
+ PyObject* list, *obj;
+ int t, l, b, r;
+
+@@ -401,7 +401,7 @@
+ {
+ PyRectObject* self = (PyRectObject*)oself;
+ GAME_Rect *argrect, temp;
+- int loop, size;
++ Py_ssize_t loop, size;
+ PyObject* list, *obj;
+ PyObject* ret = NULL;
+
+@@ -442,7 +442,7 @@
+ {
+ PyRectObject* self = (PyRectObject*)oself;
+ GAME_Rect *argrect, temp;
+- int loop, size;
++ Py_ssize_t loop, size;
+ PyObject* list, *obj;
+ PyObject* ret = NULL;
+
+@@ -807,7 +807,8 @@
+ PyRectObject *self = (PyRectObject *) _self;
+ PyObject *list;
+ int* data = (int*)&self->r;
+- int numitems, loop, l = 4;
++ Py_ssize_t numitems, loop;
++ int l = 4;
+
+ if (ihigh < 0)
+ ihigh += l;
+@@ -840,7 +841,8 @@
+ {
+ PyRectObject *self = (PyRectObject *) _self;
+ int* data = (int*)&self->r;
+- int numitems, loop, l = 4;
++ Py_ssize_t numitems, loop;
++ int l = 4;
+ int val;
+
+ if (!PySequence_Check (v))
+@@ -948,7 +950,7 @@
+ (unaryfunc)NULL, /*negative*/
+ (unaryfunc)NULL, /*pos*/
+ (unaryfunc)NULL, /*abs*/
+- (inquiry)rect_nonzero, /*nonzero*/
++ (lenfunc)rect_nonzero, /*nonzero*/
+ (unaryfunc)NULL, /*invert*/
+ (binaryfunc)NULL, /*lshift*/
+ (binaryfunc)NULL, /*rshift*/
--- src/surface.c
+++ src/surface.c
-@@ -433,7 +433,7 @@
- SDL_Palette* pal = surf->format->palette;
- SDL_Color* colors;
- PyObject* list, *item;
-- int i, len;
-+ Py_ssize_t i, len;
- int r, g, b;
-
- if(!PyArg_ParseTuple(args, "O", &list))
-@@ -448,7 +448,7 @@
- if(!SDL_WasInit(SDL_INIT_VIDEO))
- return RAISE(PyExc_SDLError, "cannot set palette without pygame.display initialized");
-
-- len = min(pal->ncolors, PySequence_Length(list));
-+ len = min((Py_ssize_t)pal->ncolors, PySequence_Length(list));
-
- colors = (SDL_Color*)malloc(len * sizeof(SDL_Color));
- if(!colors)
-@@ -1353,7 +1353,7 @@
- if(rect && kw)
- {
- PyObject *key, *value;
-- int pos=0;
-+ Py_ssize_t pos=0;
- while(PyDict_Next(kw, &pos, &key, &value))
- {
- if((PyObject_SetAttr(rect, key, value) == -1))
+@@ -753,7 +753,7 @@
+ SDL_Palette *pal = surf->format->palette;
+ SDL_Color *colors;
+ PyObject *list, *item;
+- int i, len;
++ Py_ssize_t i, len;
+ int r, g, b;
+
+ if (!PyArg_ParseTuple (args, "O", &list))
+@@ -770,7 +770,7 @@
+ return RAISE (PyExc_SDLError,
+ "cannot set palette without pygame.display initialized");
+
+- len = MIN (pal->ncolors, PySequence_Length (list));
++ len = MIN ((Py_ssize_t)pal->ncolors, PySequence_Length (list));
+
+ colors = (SDL_Color *) malloc (len * sizeof (SDL_Color));
+ if (!colors)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org