[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

STINNER Victor report at bugs.python.org
Thu Oct 14 16:09:23 EDT 2021


New submission from STINNER Victor <vstinner at python.org>:

Include/marshal.h defines 2 functions with FILE* argument in the limited C API, whereas the PEP 384 disallows that:

"In addition, functions expecting FILE* are not part of the ABI, to avoid depending on a specific version of the Microsoft C runtime DLL on Windows."
https://www.python.org/dev/peps/pep-0384/

PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int);
PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int);

I propose to exclude these functions from the limited C API.

Hopefully, they are not part of the documented stable ABI.

----------
components: C API
messages: 403941
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] marshal.h must not use FILE* type in the limited C API
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45474>
_______________________________________


More information about the Python-bugs-list mailing list