mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
bpo-45434: Limited Python.h no longer includes stdio.h (GH-28960)
The <Python.h> header file no longer includes <stdio.h> if the Py_LIMITED_API macro is defined.
This commit is contained in:
parent
af1083e975
commit
284994762d
3 changed files with 16 additions and 7 deletions
|
@ -16,12 +16,10 @@
|
|||
# define _SGI_MP_SOURCE
|
||||
#endif
|
||||
|
||||
#include <stdio.h> // NULL, FILE*
|
||||
#ifndef NULL
|
||||
# error "Python.h requires that stdio.h define NULL."
|
||||
#endif
|
||||
|
||||
#include <string.h> // memcpy()
|
||||
#ifndef Py_LIMITED_API
|
||||
# include <stdio.h> // FILE*
|
||||
#endif
|
||||
#ifdef HAVE_ERRNO_H
|
||||
# include <errno.h> // errno
|
||||
#endif
|
||||
|
@ -29,8 +27,7 @@
|
|||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDDEF_H
|
||||
// For size_t
|
||||
# include <stddef.h>
|
||||
# include <stddef.h> // size_t
|
||||
#endif
|
||||
|
||||
#include <assert.h> // assert()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue