revert last patch because Py_ssize_t is undefined in some (older?)

2008-06-28  Michael Natterer  <mitch@gimp.org>

	* pygimp-pdb.c:
	* pygimp-tile.c:
	* pygimp-colors.c: revert last patch because Py_ssize_t is
	undefined in some (older?) pythons. Needs more investigation.


svn path=/trunk/; revision=26016
This commit is contained in:
Michael Natterer 2008-06-28 21:01:53 +00:00 committed by Michael Natterer
parent 27b54c0fb6
commit 335c9a90cb
4 changed files with 17 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2008-06-28 Michael Natterer <mitch@gimp.org>
* pygimp-pdb.c:
* pygimp-tile.c:
* pygimp-colors.c: revert last patch because Py_ssize_t is
undefined in some (older?) pythons. Needs more investigation.
2008-06-28 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpviewrendererimagefile.c

View File

@ -562,7 +562,7 @@ rgb_subscript(PyObject *self, PyObject *item)
return NULL;
return rgb_getitem(self, i);
} else if (PySlice_Check(item)) {
Py_ssize_t start, stop, step, slicelength, cur, i;
int start, stop, step, slicelength, cur, i;
PyObject *ret;
if (PySlice_GetIndicesEx((PySliceObject*)item, 4,
@ -1085,7 +1085,7 @@ hsv_subscript(PyObject *self, PyObject *item)
return NULL;
return hsv_getitem(self, i);
} else if (PySlice_Check(item)) {
Py_ssize_t start, stop, step, slicelength, cur, i;
int start, stop, step, slicelength, cur, i;
PyObject *ret;
if (PySlice_GetIndicesEx((PySliceObject*)item, 4,
@ -1598,7 +1598,7 @@ hsl_subscript(PyObject *self, PyObject *item)
return NULL;
return hsl_getitem(self, i);
} else if (PySlice_Check(item)) {
Py_ssize_t start, stop, step, slicelength, cur, i;
int start, stop, step, slicelength, cur, i;
PyObject *ret;
if (PySlice_GetIndicesEx((PySliceObject*)item, 4,
@ -2104,7 +2104,7 @@ cmyk_subscript(PyObject *self, PyObject *item)
return NULL;
return cmyk_getitem(self, i);
} else if (PySlice_Check(item)) {
Py_ssize_t start, stop, step, slicelength, cur, i;
int start, stop, step, slicelength, cur, i;
PyObject *ret;
if (PySlice_GetIndicesEx((PySliceObject*)item, 5,

View File

@ -820,7 +820,7 @@ pf_call(PyGimpPDBFunction *self, PyObject *args, PyObject *kwargs)
#endif
if (kwargs) {
Py_ssize_t len, pos;
int len, pos;
PyObject *key, *val;
len = PyDict_Size(kwargs);

View File

@ -157,7 +157,7 @@ tile_subscript(PyGimpTile *self, PyObject *sub)
{
GimpTile *tile = self->tile;
int bpp = tile->bpp;
Py_ssize_t x, y;
long x, y;
if (PyInt_Check(sub)) {
x = PyInt_AsLong(sub);
@ -193,7 +193,7 @@ tile_ass_sub(PyGimpTile *self, PyObject *v, PyObject *w)
{
GimpTile *tile = self->tile;
int bpp = tile->bpp, i;
Py_ssize_t x, y;
long x, y;
guchar *pix, *data;
if (w == NULL) {
@ -306,7 +306,7 @@ PyTypeObject PyGimpTile_Type = {
static PyObject *
pr_resize(PyGimpPixelRgn *self, PyObject *args)
{
Py_ssize_t x, y, w, h;
int x, y, w, h;
if (!PyArg_ParseTuple(args, "iiii:resize", &x, &y, &w, &h))
return NULL;
@ -371,7 +371,7 @@ pr_subscript(PyGimpPixelRgn *self, PyObject *key)
GimpPixelRgn *pr = &(self->pr);
int bpp = pr->bpp;
PyObject *x, *y;
Py_ssize_t x1, y1, x2, y2, xs, ys;
int 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 @@ pr_ass_sub(PyGimpPixelRgn *self, PyObject *v, PyObject *w)
int bpp = pr->bpp;
PyObject *x, *y;
guchar *buf;
Py_ssize_t len, x1, x2, xs, y1, y2, ys;
int len, x1, x2, xs, y1, y2, ys;
if (w == NULL) {
PyErr_SetString(PyExc_TypeError, "can't delete subscripts");