Pillow icon indicating copy to clipboard operation
Pillow copied to clipboard

_imaging module cleanup

Open homm opened this issue 1 year ago • 0 comments

Includes some useful changers from #8340.

Improvements

  • Move some useful macro such as MAX and MIN to ImagingUtils.h https://github.com/python-pillow/Pillow/pull/8389/commits/517f16be0203419e4a378f31ad88d453d8e2ed69
  • ImPlatform.h is renamed to ImagingPlatform.h https://github.com/python-pillow/Pillow/pull/8389/commits/d73e8c24eebccc3275d31328d47b860b548970d4
  • All #undef *INT* moved to Jpeg.h https://github.com/python-pillow/Pillow/pull/8389/commits/89090524600360307ed06074b01908f591b40d83
  • Simplify #define *INT* by requiring stdint.h (C99) https://github.com/python-pillow/Pillow/pull/8389/commits/92bf6915b4aa0753b99f84f65729a527800c4f52
  • #include <Python.h> once in Imaging.h https://github.com/python-pillow/Pillow/pull/8389/commits/84f02611ca171f5acfa1687c126e6b2ecc9fd3bb
  • #include <math.h> in ImagingPlatform.h https://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-libs option (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_CheckBuffer and PyImaging_GetBuffer https://github.com/python-pillow/Pillow/pull/8389/commits/e9729626cc6d9914f394e5cbcb3223045c00fe51
  • Use Py_RETURN_NONE macro when possible https://github.com/python-pillow/Pillow/pull/8389/commits/f58cd7d2275d6ababca412eb839e9222f2897ca4
  • Remove unused HAVE_LIBMPEG https://github.com/python-pillow/Pillow/pull/8389/commits/ffa023060ae0b24922b4b4dffafd0d24f79c60a6
  • Move new_block method to _imaging and fix some functions arguments type https://github.com/python-pillow/Pillow/pull/8389/commits/e7bce42ade88e05488abf3b3468c939f340ad78f
  • Remove unused core.convert function https://github.com/python-pillow/Pillow/pull/8389/commits/e7bce42ade88e05488abf3b3468c939f340ad78f
  • Simplify Imaging_Type checking in _convert https://github.com/python-pillow/Pillow/pull/8389/commits/b89f791057bdd399c0db86153e76f8e8ccae8c97
  • Use PyErr_Format instead of sprintf, use native PyErr_Clear function, remove extra PyExc_TypeError after PySequence_Fast, remove unused Except.c file https://github.com/python-pillow/Pillow/pull/8389/commits/05a67d17de13d3f61c4653d5a35dc88b6502b102

homm avatar Sep 18 '24 09:09 homm