mirror of https://github.com/python/cpython
gh-108765: Python.h no longer includes <stddef.h> on Windows (#111563)
In practice, only Windows is impacted, because the HAVE_STDDEF_H macro was only defined on Windows.
This commit is contained in:
parent
c42347d025
commit
faa5f6053d
|
@ -1186,6 +1186,14 @@ Porting to Python 3.13
|
|||
``PyUnicode_AsUTF8AndSize(unicode, NULL)`` can be used instead.
|
||||
(Contributed by Victor Stinner in :gh:`111089`.)
|
||||
|
||||
* On Windows, ``Python.h`` no longer includes the ``<stddef.h>`` standard
|
||||
header file. If needed, it should now be included explicitly. For example, it
|
||||
provides ``offsetof()`` function, and ``size_t`` and ``ptrdiff_t`` types.
|
||||
Including ``<stddef.h>`` explicitly was already needed by all other
|
||||
platforms, the ``HAVE_STDDEF_H`` macro is only defined on Windows.
|
||||
(Contributed by Victor Stinner in :gh:`108765`.)
|
||||
|
||||
|
||||
Deprecated
|
||||
----------
|
||||
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
#include <math.h> // HUGE_VAL
|
||||
#include <stdarg.h> // va_list
|
||||
#include <wchar.h> // wchar_t
|
||||
#ifdef HAVE_STDDEF_H
|
||||
# include <stddef.h> // size_t
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h> // ssize_t
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
On Windows, ``Python.h`` no longer includes the ``<stddef.h>`` standard
|
||||
header file. If needed, it should now be included explicitly. Patch by
|
||||
Victor Stinner.
|
Loading…
Reference in New Issue