Pillow
Pillow copied to clipboard
_imaging module cleanup
Includes some useful changers from #8340.
Improvements
- Move some useful macro such as
MAXandMINtoImagingUtils.hhttps://github.com/python-pillow/Pillow/pull/8389/commits/517f16be0203419e4a378f31ad88d453d8e2ed69 ImPlatform.his renamed toImagingPlatform.hhttps://github.com/python-pillow/Pillow/pull/8389/commits/d73e8c24eebccc3275d31328d47b860b548970d4- All
#undef *INT*moved toJpeg.hhttps://github.com/python-pillow/Pillow/pull/8389/commits/89090524600360307ed06074b01908f591b40d83 - Simplify
#define *INT*by requiringstdint.h(C99) https://github.com/python-pillow/Pillow/pull/8389/commits/92bf6915b4aa0753b99f84f65729a527800c4f52 #include <Python.h>once inImaging.hhttps://github.com/python-pillow/Pillow/pull/8389/commits/84f02611ca171f5acfa1687c126e6b2ecc9fd3bb#include <math.h>inImagingPlatform.hhttps://github.com/python-pillow/Pillow/pull/8389/commits/fbd4c98a0a7ee234edd5ea258f62bda111389c95- Include all global libs with
<*.h>instead of"*.h"https://github.com/python-pillow/Pillow/pull/8389/commits/108602be2c0a688cabacd8e21d670c24c98ce8b9 - Removed
add-imaging-libsoption (is not documented, not sure why we need it) https://github.com/python-pillow/Pillow/pull/8389/commits/c3172e857cc0718e0f81f3e6f5ec6b68079ed05e - Use native functions instead of
PyImaging_CheckBufferandPyImaging_GetBufferhttps://github.com/python-pillow/Pillow/pull/8389/commits/e9729626cc6d9914f394e5cbcb3223045c00fe51 - Use
Py_RETURN_NONEmacro when possible https://github.com/python-pillow/Pillow/pull/8389/commits/f58cd7d2275d6ababca412eb839e9222f2897ca4 - Remove unused
HAVE_LIBMPEGhttps://github.com/python-pillow/Pillow/pull/8389/commits/ffa023060ae0b24922b4b4dffafd0d24f79c60a6 - Move
new_blockmethod to_imagingand fix some functions arguments type https://github.com/python-pillow/Pillow/pull/8389/commits/e7bce42ade88e05488abf3b3468c939f340ad78f - Remove unused
core.convertfunction https://github.com/python-pillow/Pillow/pull/8389/commits/e7bce42ade88e05488abf3b3468c939f340ad78f - Simplify
Imaging_Typechecking in_converthttps://github.com/python-pillow/Pillow/pull/8389/commits/b89f791057bdd399c0db86153e76f8e8ccae8c97 - Use
PyErr_Formatinstead ofsprintf, use nativePyErr_Clearfunction, remove extraPyExc_TypeErrorafterPySequence_Fast, remove unusedExcept.cfile https://github.com/python-pillow/Pillow/pull/8389/commits/05a67d17de13d3f61c4653d5a35dc88b6502b102