annotate Include/fileobject.h @ 70817:dd775b1561ba

Fix markup.
author Georg Brandl <georg@python.org>
date Tue, 14 Jun 2011 21:09:55 +0200
parents 62b61abd02b8
children 852ca32eb18d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42071
825041fc8e2c Rip out the file object's implementation.
Guido van Rossum <guido@python.org>
parents: 41554
diff changeset
1 /* File object interface (what's left of it -- see io.py) */
6
fc6fcd7df4f7 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2
13444
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
3 #ifndef Py_FILEOBJECT_H
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
4 #define Py_FILEOBJECT_H
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
5 #ifdef __cplusplus
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
6 extern "C" {
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
7 #endif
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
8
42071
825041fc8e2c Rip out the file object's implementation.
Guido van Rossum <guido@python.org>
parents: 41554
diff changeset
9 #define PY_STDIOTEXTMODE "b"
22312
19d1d35020bd Patch #530105: Allow file object may to be subtyped
Martin v. Löwis <martin@v.loewis.de>
parents: 21095
diff changeset
10
43712
00b136b7da84 Patch 1329 (partial) by Christian Heimes.
Guido van Rossum <guido@python.org>
parents: 43632
diff changeset
11 PyAPI_FUNC(PyObject *) PyFile_FromFd(int, char *, char *, int, char *, char *,
44134
e08b12c3b913 Add an errors parameter to open() and TextIOWrapper() to specify error handling.
Guido van Rossum <guido@python.org>
parents: 44064
diff changeset
12 char *, int);
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 24594
diff changeset
13 PyAPI_FUNC(PyObject *) PyFile_GetLine(PyObject *, int);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 24594
diff changeset
14 PyAPI_FUNC(int) PyFile_WriteObject(PyObject *, PyObject *, int);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 24594
diff changeset
15 PyAPI_FUNC(int) PyFile_WriteString(const char *, PyObject *);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 24594
diff changeset
16 PyAPI_FUNC(int) PyObject_AsFileDescriptor(PyObject *);
66664
62b61abd02b8 Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents: 64622
diff changeset
17 #ifndef Py_LIMITED_API
42071
825041fc8e2c Rip out the file object's implementation.
Guido van Rossum <guido@python.org>
parents: 41554
diff changeset
18 PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *);
66664
62b61abd02b8 Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents: 64622
diff changeset
19 #endif
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
20
17822
50376d470648 Fix the Py_FileSystemDefaultEncoding checkin - declare the variable in a fileobject.h, and initialize it in bltinmodule.
Mark Hammond <mhammond@skippinet.com.au>
parents: 14375
diff changeset
21 /* The default encoding used by the platform file system APIs
23201
c408e8b2675a Py_UniversalNewlineFread(): Many changes.
Tim Peters <tim.peters@gmail.com>
parents: 23029
diff changeset
22 If non-NULL, this is different than the default encoding for strings
17822
50376d470648 Fix the Py_FileSystemDefaultEncoding checkin - declare the variable in a fileobject.h, and initialize it in bltinmodule.
Mark Hammond <mhammond@skippinet.com.au>
parents: 14375
diff changeset
23 */
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 24594
diff changeset
24 PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding;
49403
e822992cf6ce Issue #3187: Add sys.setfilesystemencoding.
Martin v. Löwis <martin@v.loewis.de>
parents: 44134
diff changeset
25 PyAPI_DATA(int) Py_HasFileSystemDefaultEncoding;
17822
50376d470648 Fix the Py_FileSystemDefaultEncoding checkin - declare the variable in a fileobject.h, and initialize it in bltinmodule.
Mark Hammond <mhammond@skippinet.com.au>
parents: 14375
diff changeset
26
43718
e510b716bd80 Patch 1352 (continued in issue 1329) by Christian Heimes.
Guido van Rossum <guido@python.org>
parents: 43712
diff changeset
27 /* Internal API
e510b716bd80 Patch 1352 (continued in issue 1329) by Christian Heimes.
Guido van Rossum <guido@python.org>
parents: 43712
diff changeset
28
e510b716bd80 Patch 1352 (continued in issue 1329) by Christian Heimes.
Guido van Rossum <guido@python.org>
parents: 43712
diff changeset
29 The std printer acts as a preliminary sys.stderr until the new io
e510b716bd80 Patch 1352 (continued in issue 1329) by Christian Heimes.
Guido van Rossum <guido@python.org>
parents: 43712
diff changeset
30 infrastructure is in place. */
66664
62b61abd02b8 Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents: 64622
diff changeset
31 #ifndef Py_LIMITED_API
43718
e510b716bd80 Patch 1352 (continued in issue 1329) by Christian Heimes.
Guido van Rossum <guido@python.org>
parents: 43712
diff changeset
32 PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int);
e510b716bd80 Patch 1352 (continued in issue 1329) by Christian Heimes.
Guido van Rossum <guido@python.org>
parents: 43712
diff changeset
33 PyAPI_DATA(PyTypeObject) PyStdPrinter_Type;
e510b716bd80 Patch 1352 (continued in issue 1329) by Christian Heimes.
Guido van Rossum <guido@python.org>
parents: 43712
diff changeset
34
51579
648e07dd0825 Merged revisions 69364-69365,69409-69410,69413,69417,69435,69442,69447,69495,69519-69521 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49403
diff changeset
35 #if defined _MSC_VER && _MSC_VER >= 1400
648e07dd0825 Merged revisions 69364-69365,69409-69410,69413,69417,69435,69442,69447,69495,69519-69521 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49403
diff changeset
36 /* A routine to check if a file descriptor is valid on Windows. Returns 0
648e07dd0825 Merged revisions 69364-69365,69409-69410,69413,69417,69435,69442,69447,69495,69519-69521 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49403
diff changeset
37 * and sets errno to EBADF if it isn't. This is to avoid Assertions
648e07dd0825 Merged revisions 69364-69365,69409-69410,69413,69417,69435,69442,69447,69495,69519-69521 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49403
diff changeset
38 * from various functions in the Windows CRT beginning with
648e07dd0825 Merged revisions 69364-69365,69409-69410,69413,69417,69435,69442,69447,69495,69519-69521 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49403
diff changeset
39 * Visual Studio 2005
648e07dd0825 Merged revisions 69364-69365,69409-69410,69413,69417,69435,69442,69447,69495,69519-69521 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49403
diff changeset
40 */
648e07dd0825 Merged revisions 69364-69365,69409-69410,69413,69417,69435,69442,69447,69495,69519-69521 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49403
diff changeset
41 int _PyVerify_fd(int fd);
648e07dd0825 Merged revisions 69364-69365,69409-69410,69413,69417,69435,69442,69447,69495,69519-69521 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49403
diff changeset
42 #else
648e07dd0825 Merged revisions 69364-69365,69409-69410,69413,69417,69435,69442,69447,69495,69519-69521 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49403
diff changeset
43 #define _PyVerify_fd(A) (1) /* dummy */
648e07dd0825 Merged revisions 69364-69365,69409-69410,69413,69417,69435,69442,69447,69495,69519-69521 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49403
diff changeset
44 #endif
66664
62b61abd02b8 Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents: 64622
diff changeset
45 #endif /* Py_LIMITED_API */
51579
648e07dd0825 Merged revisions 69364-69365,69409-69410,69413,69417,69435,69442,69447,69495,69519-69521 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents: 49403
diff changeset
46
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
47 #ifdef __cplusplus
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
48 }
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
49 #endif
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
50 #endif /* !Py_FILEOBJECT_H */