mirror of
https://github.com/python/cpython.git
synced 2024-11-24 00:38:00 +01:00
d00f7b1b9d
* Document that slices can be marshalled * Deduplicate and organize the list of supported types in docs * Organize the type code list in marshal.c, to make it more obvious that this is a versioned format * Back-fill some historical info Co-authored-by: Michael Droettboom <mdboom@gmail.com>
32 lines
827 B
C
32 lines
827 B
C
|
|
/* Interface for marshal.c */
|
|
|
|
#ifndef Py_MARSHAL_H
|
|
#define Py_MARSHAL_H
|
|
#ifndef Py_LIMITED_API
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *,
|
|
Py_ssize_t);
|
|
PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int);
|
|
|
|
#define Py_MARSHAL_VERSION 5
|
|
|
|
PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *);
|
|
PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *);
|
|
PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *);
|
|
PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *);
|
|
|
|
PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int);
|
|
PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* Py_LIMITED_API */
|
|
#endif /* !Py_MARSHAL_H */
|