Replaced ImagingError_Clear with PyErr_Clear

This commit is contained in:
Andrew Murray 2025-06-16 08:15:08 +10:00
parent 222b86222e
commit cb433ad00a
3 changed files with 1 additions and 8 deletions

View File

@ -369,11 +369,6 @@ ImagingError_ValueError(const char *message) {
return NULL; return NULL;
} }
void
ImagingError_Clear(void) {
PyErr_Clear();
}
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
/* HELPERS */ /* HELPERS */
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */

View File

@ -280,8 +280,6 @@ extern void *
ImagingError_Mismatch(void); /* maps to ValueError by default */ ImagingError_Mismatch(void); /* maps to ValueError by default */
extern void * extern void *
ImagingError_ValueError(const char *message); ImagingError_ValueError(const char *message);
extern void
ImagingError_Clear(void);
/* Transform callbacks */ /* Transform callbacks */
/* ------------------- */ /* ------------------- */

View File

@ -645,7 +645,7 @@ ImagingNewInternal(const char *mode, int xsize, int ysize, int dirty) {
return im; return im;
} }
ImagingError_Clear(); PyErr_Clear();
// Try to allocate the image once more with smallest possible block size // Try to allocate the image once more with smallest possible block size
MUTEX_LOCK(&ImagingDefaultArena.mutex); MUTEX_LOCK(&ImagingDefaultArena.mutex);