diff options
author | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2007-04-26 09:15:08 (GMT) |
---|---|---|
committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2007-04-26 09:15:08 (GMT) |
commit | 0a440d41844aac25178400d33d714d8e479b86d4 (patch) | |
tree | 85932752a2f3ec1070e5cf231717a50fb603630a /Include/fileobject.h | |
parent | 452f5df64a09e6e50a2d861fa1d18e0bbea7ca4a (diff) | |
download | cpython-0a440d41844aac25178400d33d714d8e479b86d4.zip cpython-0a440d41844aac25178400d33d714d8e479b86d4.tar.gz cpython-0a440d41844aac25178400d33d714d8e479b86d4.tar.bz2 |
Export function sanitize_the_mode from fileobject.c as _PyFile_SanitizeMode(). Use this function in posixmodule.c when implementing fdopen(). This fixes test_subprocess.py for a VisualStudio 2005 compile.
Diffstat (limited to 'Include/fileobject.h')
-rw-r--r-- | Include/fileobject.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/fileobject.h b/Include/fileobject.h index ebbb521..9fd0646 100644 --- a/Include/fileobject.h +++ b/Include/fileobject.h @@ -57,6 +57,11 @@ PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding; char *Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); size_t Py_UniversalNewlineFread(char *, size_t, FILE *, PyObject *); +/* A routine to do sanity checking on the file mode string. returns + non-zero on if an exception occurred +*/ +int _PyFile_SanitizeMode(char *mode); + #ifdef __cplusplus } #endif |