mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 08:12:33 +03:00
Replaced ImagingError_OSError with PyErr_SetString
This commit is contained in:
parent
cb433ad00a
commit
8309962926
|
@ -338,12 +338,6 @@ static const char *no_palette = "image has no palette";
|
|||
static const char *readonly = "image is readonly";
|
||||
/* static const char* no_content = "image has no content"; */
|
||||
|
||||
void *
|
||||
ImagingError_OSError(void) {
|
||||
PyErr_SetString(PyExc_OSError, "error when accessing file");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void *
|
||||
ImagingError_MemoryError(void) {
|
||||
return PyErr_NoMemory();
|
||||
|
|
|
@ -54,7 +54,7 @@ ImagingSavePPM(Imaging im, const char *outfile) {
|
|||
|
||||
fp = fopen(outfile, "wb");
|
||||
if (!fp) {
|
||||
(void)ImagingError_OSError();
|
||||
PyErr_SetString(PyExc_OSError, "error when accessing file");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -270,8 +270,6 @@ ImagingSectionLeave(ImagingSectionCookie *cookie);
|
|||
/* Exceptions */
|
||||
/* ---------- */
|
||||
|
||||
extern void *
|
||||
ImagingError_OSError(void);
|
||||
extern void *
|
||||
ImagingError_MemoryError(void);
|
||||
extern void *
|
||||
|
|
Loading…
Reference in New Issue
Block a user