summaryrefslogtreecommitdiffstats
path: root/Modules/imgfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/imgfile.c')
-rw-r--r--Modules/imgfile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/imgfile.c b/Modules/imgfile.c
index baa6ead..5a8adf2 100644
--- a/Modules/imgfile.c
+++ b/Modules/imgfile.c
@@ -130,12 +130,12 @@ imgfile_read(PyObject *self, PyObject *args)
}
if ( zsize == 3 ) zsize = 4;
- rv = PyString_FromStringAndSize((char *)NULL, xsize*ysize*zsize);
+ rv = PyBytes_FromStringAndSize((char *)NULL, xsize*ysize*zsize);
if ( rv == NULL ) {
iclose(image);
return NULL;
}
- cdatap = PyString_AsString(rv);
+ cdatap = PyBytes_AsString(rv);
idatap = (long *)cdatap;
if (top_to_bottom) {
@@ -319,7 +319,7 @@ imgfile_readscaled(PyObject *self, PyObject *args)
}
if ( zsize == 3 ) zsize = 4;
- rv = PyString_FromStringAndSize(NULL, xwtd*ywtd*zsize);
+ rv = PyBytes_FromStringAndSize(NULL, xwtd*ywtd*zsize);
if ( rv == NULL ) {
iclose(image);
return NULL;
@@ -328,7 +328,7 @@ imgfile_readscaled(PyObject *self, PyObject *args)
xfac = (float)xsize/(float)xwtd;
yfac = (float)ysize/(float)ywtd;
PyFPE_END_PROTECT(yfac)
- cdatap = PyString_AsString(rv);
+ cdatap = PyBytes_AsString(rv);
idatap = (long *)cdatap;
if ( extended ) {