blob: aefeffec4e67fb77ee8ffc9bf2acfcc06b9ec036 [file] [log] [blame]
Guido van Rossumf70e43a1991-02-19 12:39:46 +00001
Guido van Rossum85a5fbb1990-10-14 12:07:46 +00002/* File object interface */
3
Fred Drakeea9cb5a2000-07-09 00:20:36 +00004#ifndef Py_FILEOBJECT_H
5#define Py_FILEOBJECT_H
6#ifdef __cplusplus
7extern "C" {
8#endif
9
Guido van Rossum051ab121995-02-27 10:17:52 +000010extern DL_IMPORT(PyTypeObject) PyFile_Type;
Guido van Rossum85a5fbb1990-10-14 12:07:46 +000011
Guido van Rossumcaa63801995-01-12 11:45:45 +000012#define PyFile_Check(op) ((op)->ob_type == &PyFile_Type)
Guido van Rossum85a5fbb1990-10-14 12:07:46 +000013
Fred Drakeea9cb5a2000-07-09 00:20:36 +000014extern DL_IMPORT(PyObject *) PyFile_FromString(char *, char *);
15extern DL_IMPORT(void) PyFile_SetBufSize(PyObject *, int);
16extern DL_IMPORT(PyObject *) PyFile_FromFile(FILE *, char *, char *,
17 int (*)(FILE *));
18extern DL_IMPORT(FILE *) PyFile_AsFile(PyObject *);
19extern DL_IMPORT(PyObject *) PyFile_Name(PyObject *);
20extern DL_IMPORT(PyObject *) PyFile_GetLine(PyObject *, int);
21extern DL_IMPORT(int) PyFile_WriteObject(PyObject *, PyObject *, int);
22extern DL_IMPORT(int) PyFile_SoftSpace(PyObject *, int);
23extern DL_IMPORT(int) PyFile_WriteString(char *, PyObject *);
Andrew M. Kuchling06051ed2000-07-13 23:56:54 +000024extern DL_IMPORT(int) PyObject_AsFileDescriptor(PyObject *);
Guido van Rossuma3309961993-07-28 09:05:47 +000025
26#ifdef __cplusplus
27}
28#endif
29#endif /* !Py_FILEOBJECT_H */