]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix the Py_FileSystemDefaultEncoding checkin - declare the variable in a fileobject...
authorMark Hammond <mhammond@skippinet.com.au>
Mon, 14 May 2001 12:17:34 +0000 (12:17 +0000)
committerMark Hammond <mhammond@skippinet.com.au>
Mon, 14 May 2001 12:17:34 +0000 (12:17 +0000)
Include/fileobject.h
Modules/posixmodule.c
Python/bltinmodule.c

index aefeffec4e67fb77ee8ffc9bf2acfcc06b9ec036..a3670c2f6a0c6945b2d46f4623ad5e6b26c35f62 100644 (file)
@@ -23,6 +23,11 @@ extern DL_IMPORT(int) PyFile_SoftSpace(PyObject *, int);
 extern DL_IMPORT(int) PyFile_WriteString(char *, 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
 }
 #endif
index 87d584ec27995e4a3816ed3d76a74602cf1c4073..430a44a85835a1a59ff5dab99adead8a02e6741c 100644 (file)
@@ -233,16 +233,6 @@ extern int lstat(const char *, struct stat *);
 #endif /* MS_WIN32 */
 #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)
 #include <io.h>
 #endif /* OS2 */
index 5ffecb3443e43c1f18d6bb1153182847697d51b3..b647f3b74d2aa8dd391633fec4d81778d337bc33 100644 (file)
 #include <unistd.h>
 #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 */
 static PyObject *filterstring(PyObject *, PyObject *);