gimp r26011 - in trunk: . plug-ins/pygimp
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26011 - in trunk: . plug-ins/pygimp
- Date: Sat, 28 Jun 2008 16:38:50 +0000 (UTC)
Author: martinn
Date: Sat Jun 28 16:38:50 2008
New Revision: 26011
URL: http://svn.gnome.org/viewvc/gimp?rev=26011&view=rev
Log:
2008-06-28 Martin Nordholts <martinn svn gnome org>
* pygimp-pdb.c:
* pygimp-tile.c:
* pygimp-colors.c: Applied patch from Ed Swartz that makes use of
Py_ssize_t:s instead of int:s to better utilize 64-bit
systems. (Bug #540629.)
Modified:
trunk/ChangeLog
trunk/plug-ins/pygimp/pygimp-colors.c
trunk/plug-ins/pygimp/pygimp-pdb.c
trunk/plug-ins/pygimp/pygimp-tile.c
Modified: trunk/plug-ins/pygimp/pygimp-colors.c
==============================================================================
--- trunk/plug-ins/pygimp/pygimp-colors.c (original)
+++ trunk/plug-ins/pygimp/pygimp-colors.c Sat Jun 28 16:38:50 2008
@@ -562,7 +562,7 @@
return NULL;
return rgb_getitem(self, i);
} else if (PySlice_Check(item)) {
- int start, stop, step, slicelength, cur, i;
+ Py_ssize_t start, stop, step, slicelength, cur, i;
PyObject *ret;
if (PySlice_GetIndicesEx((PySliceObject*)item, 4,
@@ -1085,7 +1085,7 @@
return NULL;
return hsv_getitem(self, i);
} else if (PySlice_Check(item)) {
- int start, stop, step, slicelength, cur, i;
+ Py_ssize_t start, stop, step, slicelength, cur, i;
PyObject *ret;
if (PySlice_GetIndicesEx((PySliceObject*)item, 4,
@@ -1598,7 +1598,7 @@
return NULL;
return hsl_getitem(self, i);
} else if (PySlice_Check(item)) {
- int start, stop, step, slicelength, cur, i;
+ Py_ssize_t start, stop, step, slicelength, cur, i;
PyObject *ret;
if (PySlice_GetIndicesEx((PySliceObject*)item, 4,
@@ -2104,7 +2104,7 @@
return NULL;
return cmyk_getitem(self, i);
} else if (PySlice_Check(item)) {
- int start, stop, step, slicelength, cur, i;
+ Py_ssize_t start, stop, step, slicelength, cur, i;
PyObject *ret;
if (PySlice_GetIndicesEx((PySliceObject*)item, 5,
Modified: trunk/plug-ins/pygimp/pygimp-pdb.c
==============================================================================
--- trunk/plug-ins/pygimp/pygimp-pdb.c (original)
+++ trunk/plug-ins/pygimp/pygimp-pdb.c Sat Jun 28 16:38:50 2008
@@ -820,7 +820,7 @@
#endif
if (kwargs) {
- int len, pos;
+ Py_ssize_t len, pos;
PyObject *key, *val;
len = PyDict_Size(kwargs);
Modified: trunk/plug-ins/pygimp/pygimp-tile.c
==============================================================================
--- trunk/plug-ins/pygimp/pygimp-tile.c (original)
+++ trunk/plug-ins/pygimp/pygimp-tile.c Sat Jun 28 16:38:50 2008
@@ -157,7 +157,7 @@
{
GimpTile *tile = self->tile;
int bpp = tile->bpp;
- long x, y;
+ Py_ssize_t x, y;
if (PyInt_Check(sub)) {
x = PyInt_AsLong(sub);
@@ -193,7 +193,7 @@
{
GimpTile *tile = self->tile;
int bpp = tile->bpp, i;
- long x, y;
+ Py_ssize_t x, y;
guchar *pix, *data;
if (w == NULL) {
@@ -306,7 +306,7 @@
static PyObject *
pr_resize(PyGimpPixelRgn *self, PyObject *args)
{
- int x, y, w, h;
+ Py_ssize_t x, y, w, h;
if (!PyArg_ParseTuple(args, "iiii:resize", &x, &y, &w, &h))
return NULL;
@@ -371,7 +371,7 @@
GimpPixelRgn *pr = &(self->pr);
int bpp = pr->bpp;
PyObject *x, *y;
- int x1, y1, x2, y2, xs, ys;
+ Py_ssize_t x1, y1, x2, y2, xs, ys;
if (!PyTuple_Check(key) || PyTuple_Size(key) != 2) {
PyErr_SetString(PyExc_TypeError, "subscript must be a 2-tuple");
@@ -480,7 +480,7 @@
int bpp = pr->bpp;
PyObject *x, *y;
guchar *buf;
- int len, x1, x2, xs, y1, y2, ys;
+ Py_ssize_t len, x1, x2, xs, y1, y2, ys;
if (w == NULL) {
PyErr_SetString(PyExc_TypeError, "can't delete subscripts");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]