marshal.h 803 Bytes
Newer Older
Guido van Rossum's avatar
Guido van Rossum committed
1 2 3

/* Interface for marshal.c */

4 5 6 7 8 9
#ifndef Py_MARSHAL_H
#define Py_MARSHAL_H
#ifdef __cplusplus
extern "C" {
#endif

10
#define Py_MARSHAL_VERSION 4
11 12 13 14

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

16
#ifndef Py_LIMITED_API
17 18 19 20
PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *);
PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *);
PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *);
PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *);
21
#endif
22 23
PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *,
                                                      Py_ssize_t);
24 25 26 27 28

#ifdef __cplusplus
}
#endif
#endif /* !Py_MARSHAL_H */