mirror of
https://github.com/python/cpython.git
synced 2025-09-04 16:01:10 +00:00
Fix the Py_FileSystemDefaultEncoding checkin - declare the variable in a fileobject.h, and initialize it in bltinmodule.
This commit is contained in:
parent
834f4dd7c9
commit
26cffde4c2
3 changed files with 13 additions and 11 deletions
|
@ -23,6 +23,11 @@ extern DL_IMPORT(int) PyFile_SoftSpace(PyObject *, int);
|
||||||
extern DL_IMPORT(int) PyFile_WriteString(char *, PyObject *);
|
extern DL_IMPORT(int) PyFile_WriteString(char *, PyObject *);
|
||||||
extern DL_IMPORT(int) PyObject_AsFileDescriptor(PyObject *);
|
extern DL_IMPORT(int) PyObject_AsFileDescriptor(PyObject *);
|
||||||
|
|
||||||
|
/* The default encoding used by the platform file system APIs
|
||||||
|
If non-NULL, this is different than the default encoding for strings
|
||||||
|
*/
|
||||||
|
extern DL_IMPORT(const char *) Py_FileSystemDefaultEncoding;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -233,16 +233,6 @@ extern int lstat(const char *, struct stat *);
|
||||||
#endif /* MS_WIN32 */
|
#endif /* MS_WIN32 */
|
||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
/* The default encoding used by the platform file system APIs
|
|
||||||
If non-NULL, this is almost certainly different than the default
|
|
||||||
encoding for strings (otherwise it can remain NULL!)
|
|
||||||
*/
|
|
||||||
#ifdef MS_WIN32
|
|
||||||
const char *Py_FileSystemDefaultEncoding = "mbcs";
|
|
||||||
#else
|
|
||||||
const char *Py_FileSystemDefaultEncoding = NULL; /* use default */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
|
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif /* OS2 */
|
#endif /* OS2 */
|
||||||
|
|
|
@ -13,7 +13,14 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const char *Py_FileSystemDefaultEncoding;
|
/* The default encoding used by the platform file system APIs
|
||||||
|
Can remain NULL for all platforms that don't have such a concept
|
||||||
|
*/
|
||||||
|
#ifdef MS_WIN32
|
||||||
|
const char *Py_FileSystemDefaultEncoding = "mbcs";
|
||||||
|
#else
|
||||||
|
const char *Py_FileSystemDefaultEncoding = NULL; /* use default */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Forward */
|
/* Forward */
|
||||||
static PyObject *filterstring(PyObject *, PyObject *);
|
static PyObject *filterstring(PyObject *, PyObject *);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue