mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
bpo-45434: Only exclude <stdlib.h> in Python 3.11 limited C API (GH-29027)
The Python 3.11 limited C API no longer includes stdlib.h, stdio.h, string.h and errno.h. * Exclude Py_MEMCPY() from Python 3.11 limited C API. * xxlimited C extension is now built with Python 3.11 limited C API.
This commit is contained in:
parent
0a4c82ddd3
commit
52af0756b2
6 changed files with 19 additions and 31 deletions
|
@ -16,12 +16,14 @@
|
|||
# define _SGI_MP_SOURCE
|
||||
#endif
|
||||
|
||||
#include <string.h> // memcpy()
|
||||
#ifndef Py_LIMITED_API
|
||||
// stdlib.h, stdio.h, errno.h and string.h headers are not used by Python
|
||||
// headers, but kept for backward compatibility. They are excluded from the
|
||||
// limited C API of Python 3.11.
|
||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
|
||||
# include <stdlib.h>
|
||||
# include <stdio.h> // FILE*
|
||||
#endif
|
||||
#ifdef HAVE_ERRNO_H
|
||||
# include <errno.h> // errno
|
||||
# include <string.h> // memcpy()
|
||||
#endif
|
||||
#ifndef MS_WINDOWS
|
||||
# include <unistd.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue