diff options
author | Victor Stinner <vstinner@python.org> | 2020-04-15 02:35:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 02:35:41 +0200 |
commit | 4a21e57fe55076c77b0ee454e1994ca544d09dc0 (patch) | |
tree | 1c9ed1c1a467357a470cd37b98e20aa5b9878cf9 /Modules/_ctypes | |
parent | 62183b8d6d49e59c6a98bbdaa65b7ea1415abb7f (diff) | |
download | cpython-git-4a21e57fe55076c77b0ee454e1994ca544d09dc0.tar.gz |
bpo-40268: Remove unused structmember.h includes (GH-19530)
If only offsetof() is needed: include stddef.h instead.
When structmember.h is used, add a comment explaining that
PyMemberDef is used.
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 2 | ||||
-rw-r--r-- | Modules/_ctypes/callproc.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 5548c50cf5..ceae67ebb1 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -102,7 +102,7 @@ bytes(cdata) #define PY_SSIZE_T_CLEAN #include "Python.h" -#include "structmember.h" +#include "structmember.h" // PyMemberDef #include <ffi.h> #ifdef MS_WIN32 diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 815fc6664d..5c1ecabd81 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -55,7 +55,7 @@ */ #include "Python.h" -#include "structmember.h" +#include "structmember.h" // PyMemberDef #ifdef MS_WIN32 #include <windows.h> @@ -751,7 +751,7 @@ static int ConvParam(PyObject *obj, Py_ssize_t index, struct argument *pa) #if defined(MS_WIN32) && !defined(_WIN32_WCE) /* Per: https://msdn.microsoft.com/en-us/library/7572ztz4.aspx -To be returned by value in RAX, user-defined types must have a length +To be returned by value in RAX, user-defined types must have a length of 1, 2, 4, 8, 16, 32, or 64 bits */ int can_return_struct_as_int(size_t s) |