Commit Graph

19 Commits

Author SHA1 Message Date
Andrew Murray
929dbba834 Handle failure from PyDict_New or PyList_New 2023-03-10 17:37:06 +11:00
Andrew Murray
fe32501922 Corrected allocation 2022-01-14 10:16:35 +11:00
Andrew Murray
2d9dfefe6e Added specific error if coordinate type is incorrect 2022-01-08 13:47:51 +11:00
Andrew Murray
c48271ab35 Handle case where path count is zero 2022-01-01 15:44:04 +11:00
Andrew Murray
1e092419b6 Initialize coordinates to zero 2022-01-01 15:44:04 +11:00
Andrew Murray
f2ee5d6697 Use METH_VARARGS flags 2021-05-11 20:16:44 +10:00
Andrew Murray
46b7e86bab Format with ClangFormat 2021-01-03 14:17:51 +11:00
Andrew Murray
b7fb39fff8 Use ImagingError_MemoryError NULL return value 2020-12-20 13:00:16 +11:00
Andrew Murray
75542fea6d Replaced PyErr_NoMemory with ImagingError_MemoryError 2020-12-20 13:00:10 +11:00
Hugo van Kemenade
f9852c0381
Merge branch 'master' into fix-imagingHinclude 2020-10-14 14:50:36 +03:00
Axel Huebl
f79379ed7c Imaging.h: confusion with system
The file `libImaging/Imaging.h` gets installed flat on
Ubuntus into the public Python includes.

When building a newer version of Pillow from source and
hinting the Python includes "too early" in includes, e.g.
in package managers, this can confuse the two files and
pick up the external file over the internal one. With
different versions, this mismatch can lead to build errors,
e.g. undefined macros.

The most robust way to avoid this is to pre-fix the internal
include accordingly, so that the relative path to the including
file has to match as well.
2020-09-17 18:06:45 +10:00
Andrew Murray
ffe566f0c3 Fixed comparison warnings 2020-08-15 13:22:58 +10:00
Andrew Murray
c1d9931adc Added braces 2020-05-10 19:56:36 +10:00
Hugo
af770a6c55 Drop support for EOL Python 2.7 2019-10-07 14:30:59 +03:00
Christoph Gohlke
afed559e4f
Fix msvc9 compile error 2019-06-25 17:18:37 -07:00
Christoph Gohlke
c34cefb576
Use ssize_t to store number of elements in buffer 2019-06-25 14:41:06 -07:00
Lumir Balhar
78bf8ea041 Fix potential leaked storage issues (CWE-772) 2018-10-02 14:06:21 +02:00
Jon Dufresne
e705cd1476 Fix dereferencing type-punned pointer will break strict-aliasing
Compiler warning appeared as:

src/path.c:574:22: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                      Py_TYPE(&item)->tp_name);
                      ^~~~~~~

As item is already of type PyObject*, and the Py_TYPE macro is
equivalent to (((PyObject*)(o))->ob_type), no need for the dereference.

https://docs.python.org/3/c-api/structures.html#c.Py_TYPE
2018-04-03 20:42:03 -07:00
wiredfool
0bb3f4fee9 source layout reorg 2017-12-28 14:49:47 +00:00