Merge change 54982 from the trunk. This fixes the test_subprocess test in the testsuite for VisualStudio2005 builds, by "sanitizing" the "mode" that is used in the posixmodule's fdopen(). In particular the non-standard "U" mode character is removed.

This commit is contained in:
Kristján Valur Jónsson 2007-05-07 19:25:38 +00:00
parent dffe9a214b
commit a1392d5ace
3 changed files with 26 additions and 14 deletions

View file

@ -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