mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-45474: Exclude all of marshal.h if Py_LIMITED_API is defined (GH-29061)
Also, reword the What's New messages: this doesn't change the limited API, it only brings the Py_LIMITED_API macro closer to the ideal of only allowing the limited API. Automerge-Triggered-By: GH:encukou
This commit is contained in:
parent
085ccb0f17
commit
98fa3b53e2
3 changed files with 15 additions and 9 deletions
|
@ -3,6 +3,8 @@
|
|||
|
||||
#ifndef Py_MARSHAL_H
|
||||
#define Py_MARSHAL_H
|
||||
#ifndef Py_LIMITED_API
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -11,7 +13,6 @@ PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *,
|
|||
Py_ssize_t);
|
||||
PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int);
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
#define Py_MARSHAL_VERSION 4
|
||||
|
||||
PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *);
|
||||
|
@ -21,9 +22,10 @@ PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *);
|
|||
|
||||
PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int);
|
||||
PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Py_LIMITED_API */
|
||||
#endif /* !Py_MARSHAL_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue