mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more.
This commit is contained in:
parent
0c3b4c6e70
commit
b24bb27d22
6 changed files with 32 additions and 52 deletions
|
@ -112,7 +112,7 @@ PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**);
|
||||||
? (PyObject*)((PyInstanceObject*)(x))->in_class \
|
? (PyObject*)((PyInstanceObject*)(x))->in_class \
|
||||||
: (PyObject*)((x)->ob_type)))
|
: (PyObject*)((x)->ob_type)))
|
||||||
|
|
||||||
|
|
||||||
/* Predefined exceptions */
|
/* Predefined exceptions */
|
||||||
|
|
||||||
PyAPI_DATA(PyObject *) PyExc_BaseException;
|
PyAPI_DATA(PyObject *) PyExc_BaseException;
|
||||||
|
@ -186,10 +186,10 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromErrno(PyObject *);
|
||||||
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenameObject(
|
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenameObject(
|
||||||
PyObject *, PyObject *);
|
PyObject *, PyObject *);
|
||||||
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename(PyObject *, char *);
|
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename(PyObject *, char *);
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename(
|
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename(
|
||||||
PyObject *, Py_UNICODE *);
|
PyObject *, Py_UNICODE *);
|
||||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
#endif /* MS_WINDOWS */
|
||||||
|
|
||||||
PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...)
|
PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...)
|
||||||
Py_GCC_ATTRIBUTE((format(printf, 2, 3)));
|
Py_GCC_ATTRIBUTE((format(printf, 2, 3)));
|
||||||
|
@ -199,19 +199,15 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilenameObject(
|
||||||
int, const char *);
|
int, const char *);
|
||||||
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename(
|
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename(
|
||||||
int, const char *);
|
int, const char *);
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
|
||||||
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithUnicodeFilename(
|
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithUnicodeFilename(
|
||||||
int, const Py_UNICODE *);
|
int, const Py_UNICODE *);
|
||||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
|
||||||
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErr(int);
|
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErr(int);
|
||||||
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObject(
|
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObject(
|
||||||
PyObject *,int, PyObject *);
|
PyObject *,int, PyObject *);
|
||||||
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilename(
|
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilename(
|
||||||
PyObject *,int, const char *);
|
PyObject *,int, const char *);
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
|
||||||
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithUnicodeFilename(
|
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithUnicodeFilename(
|
||||||
PyObject *,int, const Py_UNICODE *);
|
PyObject *,int, const Py_UNICODE *);
|
||||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
|
||||||
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int);
|
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int);
|
||||||
#endif /* MS_WINDOWS */
|
#endif /* MS_WINDOWS */
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
|
||||||
else {
|
else {
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
if (GetVersion() < 0x80000000) {
|
if (GetVersion() < 0x80000000) {
|
||||||
/* On NT, so wide API available */
|
/* On NT, so wide API available */
|
||||||
PyObject *po;
|
PyObject *po;
|
||||||
|
|
|
@ -523,13 +523,13 @@ posix_error_with_filename(char* name)
|
||||||
return PyErr_SetFromErrnoWithFilename(PyExc_OSError, name);
|
return PyErr_SetFromErrnoWithFilename(PyExc_OSError, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
static PyObject *
|
static PyObject *
|
||||||
posix_error_with_unicode_filename(Py_UNICODE* name)
|
posix_error_with_unicode_filename(Py_UNICODE* name)
|
||||||
{
|
{
|
||||||
return PyErr_SetFromErrnoWithUnicodeFilename(PyExc_OSError, name);
|
return PyErr_SetFromErrnoWithUnicodeFilename(PyExc_OSError, name);
|
||||||
}
|
}
|
||||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
#endif /* MS_WINDOWS */
|
||||||
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -556,7 +556,6 @@ win32_error(char* function, char* filename)
|
||||||
return PyErr_SetFromWindowsErr(errno);
|
return PyErr_SetFromWindowsErr(errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
win32_error_unicode(char* function, Py_UNICODE* filename)
|
win32_error_unicode(char* function, Py_UNICODE* filename)
|
||||||
{
|
{
|
||||||
|
@ -585,9 +584,7 @@ convert_to_unicode(PyObject **param)
|
||||||
return (*param) != NULL;
|
return (*param) != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
#endif /* MS_WINDOWS */
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PYOS_OS2)
|
#if defined(PYOS_OS2)
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
@ -686,7 +683,7 @@ posix_fildes(PyObject *fdobj, int (*func)(int))
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
static int
|
static int
|
||||||
unicode_file_names(void)
|
unicode_file_names(void)
|
||||||
{
|
{
|
||||||
|
@ -741,7 +738,7 @@ posix_2str(PyObject *args,
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
static PyObject*
|
static PyObject*
|
||||||
win32_1str(PyObject* args, char* func,
|
win32_1str(PyObject* args, char* func,
|
||||||
char* format, BOOL (__stdcall *funcA)(LPCSTR),
|
char* format, BOOL (__stdcall *funcA)(LPCSTR),
|
||||||
|
@ -1497,7 +1494,6 @@ IsUNCRootA(char *path, int pathlen)
|
||||||
#undef ISSLASH
|
#undef ISSLASH
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
|
||||||
static BOOL
|
static BOOL
|
||||||
IsUNCRootW(Py_UNICODE *path, int pathlen)
|
IsUNCRootW(Py_UNICODE *path, int pathlen)
|
||||||
{
|
{
|
||||||
|
@ -1520,7 +1516,6 @@ IsUNCRootW(Py_UNICODE *path, int pathlen)
|
||||||
|
|
||||||
#undef ISSLASH
|
#undef ISSLASH
|
||||||
}
|
}
|
||||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
|
||||||
#endif /* MS_WINDOWS */
|
#endif /* MS_WINDOWS */
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -1540,7 +1535,7 @@ posix_do_stat(PyObject *self, PyObject *args,
|
||||||
int res;
|
int res;
|
||||||
PyObject *result;
|
PyObject *result;
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
/* If on wide-character-capable OS see if argument
|
/* If on wide-character-capable OS see if argument
|
||||||
is Unicode and if so use wide API. */
|
is Unicode and if so use wide API. */
|
||||||
if (unicode_file_names()) {
|
if (unicode_file_names()) {
|
||||||
|
@ -1603,7 +1598,7 @@ posix_access(PyObject *self, PyObject *args)
|
||||||
char *path;
|
char *path;
|
||||||
int mode;
|
int mode;
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
DWORD attr;
|
DWORD attr;
|
||||||
if (unicode_file_names()) {
|
if (unicode_file_names()) {
|
||||||
PyUnicodeObject *po;
|
PyUnicodeObject *po;
|
||||||
|
@ -1636,7 +1631,7 @@ finish:
|
||||||
return PyBool_FromLong(!(mode & 2)
|
return PyBool_FromLong(!(mode & 2)
|
||||||
|| !(attr & FILE_ATTRIBUTE_READONLY)
|
|| !(attr & FILE_ATTRIBUTE_READONLY)
|
||||||
|| (attr & FILE_ATTRIBUTE_DIRECTORY));
|
|| (attr & FILE_ATTRIBUTE_DIRECTORY));
|
||||||
#else
|
#else /* MS_WINDOWS */
|
||||||
int res;
|
int res;
|
||||||
if (!PyArg_ParseTuple(args, "eti:access",
|
if (!PyArg_ParseTuple(args, "eti:access",
|
||||||
Py_FileSystemDefaultEncoding, &path, &mode))
|
Py_FileSystemDefaultEncoding, &path, &mode))
|
||||||
|
@ -1646,7 +1641,7 @@ finish:
|
||||||
Py_END_ALLOW_THREADS
|
Py_END_ALLOW_THREADS
|
||||||
PyMem_Free(path);
|
PyMem_Free(path);
|
||||||
return PyBool_FromLong(res == 0);
|
return PyBool_FromLong(res == 0);
|
||||||
#endif
|
#endif /* MS_WINDOWS */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef F_OK
|
#ifndef F_OK
|
||||||
|
@ -1757,7 +1752,7 @@ posix_chmod(PyObject *self, PyObject *args)
|
||||||
char *path = NULL;
|
char *path = NULL;
|
||||||
int i;
|
int i;
|
||||||
int res;
|
int res;
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
DWORD attr;
|
DWORD attr;
|
||||||
if (unicode_file_names()) {
|
if (unicode_file_names()) {
|
||||||
PyUnicodeObject *po;
|
PyUnicodeObject *po;
|
||||||
|
@ -1807,7 +1802,7 @@ posix_chmod(PyObject *self, PyObject *args)
|
||||||
PyMem_Free(path);
|
PyMem_Free(path);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
#else /* Py_WIN_WIDE_FILENAMES */
|
#else /* MS_WINDOWS */
|
||||||
if (!PyArg_ParseTuple(args, "eti:chmod", Py_FileSystemDefaultEncoding,
|
if (!PyArg_ParseTuple(args, "eti:chmod", Py_FileSystemDefaultEncoding,
|
||||||
&path, &i))
|
&path, &i))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -2092,7 +2087,7 @@ posix_getcwdu(PyObject *self, PyObject *noargs)
|
||||||
char buf[1026];
|
char buf[1026];
|
||||||
char *res;
|
char *res;
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
DWORD len;
|
DWORD len;
|
||||||
if (unicode_file_names()) {
|
if (unicode_file_names()) {
|
||||||
wchar_t wbuf[1026];
|
wchar_t wbuf[1026];
|
||||||
|
@ -2121,7 +2116,7 @@ posix_getcwdu(PyObject *self, PyObject *noargs)
|
||||||
if (wbuf2 != wbuf) free(wbuf2);
|
if (wbuf2 != wbuf) free(wbuf2);
|
||||||
return resobj;
|
return resobj;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* MS_WINDOWS */
|
||||||
|
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
#if defined(PYOS_OS2) && defined(PYCC_GCC)
|
#if defined(PYOS_OS2) && defined(PYCC_GCC)
|
||||||
|
@ -2134,8 +2129,8 @@ posix_getcwdu(PyObject *self, PyObject *noargs)
|
||||||
return posix_error();
|
return posix_error();
|
||||||
return PyUnicode_Decode(buf, strlen(buf), Py_FileSystemDefaultEncoding,"strict");
|
return PyUnicode_Decode(buf, strlen(buf), Py_FileSystemDefaultEncoding,"strict");
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* Py_USING_UNICODE */
|
||||||
#endif
|
#endif /* HAVE_GETCWD */
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_LINK
|
#ifdef HAVE_LINK
|
||||||
|
@ -2175,7 +2170,6 @@ posix_listdir(PyObject *self, PyObject *args)
|
||||||
char *bufptr = namebuf;
|
char *bufptr = namebuf;
|
||||||
Py_ssize_t len = sizeof(namebuf)-5; /* only claim to have space for MAX_PATH */
|
Py_ssize_t len = sizeof(namebuf)-5; /* only claim to have space for MAX_PATH */
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
|
||||||
/* If on wide-character-capable OS see if argument
|
/* If on wide-character-capable OS see if argument
|
||||||
is Unicode and if so use wide API. */
|
is Unicode and if so use wide API. */
|
||||||
if (unicode_file_names()) {
|
if (unicode_file_names()) {
|
||||||
|
@ -2258,7 +2252,6 @@ posix_listdir(PyObject *self, PyObject *args)
|
||||||
are also valid. */
|
are also valid. */
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "et#:listdir",
|
if (!PyArg_ParseTuple(args, "et#:listdir",
|
||||||
Py_FileSystemDefaultEncoding, &bufptr, &len))
|
Py_FileSystemDefaultEncoding, &bufptr, &len))
|
||||||
|
@ -2482,7 +2475,7 @@ posix__getfullpathname(PyObject *self, PyObject *args)
|
||||||
Py_ssize_t insize = sizeof(inbuf);
|
Py_ssize_t insize = sizeof(inbuf);
|
||||||
char outbuf[MAX_PATH*2];
|
char outbuf[MAX_PATH*2];
|
||||||
char *temp;
|
char *temp;
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
|
||||||
if (unicode_file_names()) {
|
if (unicode_file_names()) {
|
||||||
PyUnicodeObject *po;
|
PyUnicodeObject *po;
|
||||||
if (PyArg_ParseTuple(args, "U|:_getfullpathname", &po)) {
|
if (PyArg_ParseTuple(args, "U|:_getfullpathname", &po)) {
|
||||||
|
@ -2512,7 +2505,7 @@ posix__getfullpathname(PyObject *self, PyObject *args)
|
||||||
are also valid. */
|
are also valid. */
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (!PyArg_ParseTuple (args, "et#:_getfullpathname",
|
if (!PyArg_ParseTuple (args, "et#:_getfullpathname",
|
||||||
Py_FileSystemDefaultEncoding, &inbufp,
|
Py_FileSystemDefaultEncoding, &inbufp,
|
||||||
&insize))
|
&insize))
|
||||||
|
@ -2539,7 +2532,7 @@ posix_mkdir(PyObject *self, PyObject *args)
|
||||||
char *path = NULL;
|
char *path = NULL;
|
||||||
int mode = 0777;
|
int mode = 0777;
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
if (unicode_file_names()) {
|
if (unicode_file_names()) {
|
||||||
PyUnicodeObject *po;
|
PyUnicodeObject *po;
|
||||||
if (PyArg_ParseTuple(args, "U|i:mkdir", &po, &mode)) {
|
if (PyArg_ParseTuple(args, "U|i:mkdir", &po, &mode)) {
|
||||||
|
@ -2573,7 +2566,7 @@ posix_mkdir(PyObject *self, PyObject *args)
|
||||||
PyMem_Free(path);
|
PyMem_Free(path);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
#else
|
#else /* MS_WINDOWS */
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "et|i:mkdir",
|
if (!PyArg_ParseTuple(args, "et|i:mkdir",
|
||||||
Py_FileSystemDefaultEncoding, &path, &mode))
|
Py_FileSystemDefaultEncoding, &path, &mode))
|
||||||
|
@ -2590,7 +2583,7 @@ posix_mkdir(PyObject *self, PyObject *args)
|
||||||
PyMem_Free(path);
|
PyMem_Free(path);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
#endif
|
#endif /* MS_WINDOWS */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2833,7 +2826,7 @@ second form is used, set the access and modified times to the current time.");
|
||||||
static PyObject *
|
static PyObject *
|
||||||
posix_utime(PyObject *self, PyObject *args)
|
posix_utime(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
PyObject *arg;
|
PyObject *arg;
|
||||||
PyUnicodeObject *obwpath;
|
PyUnicodeObject *obwpath;
|
||||||
wchar_t *wpath = NULL;
|
wchar_t *wpath = NULL;
|
||||||
|
@ -2911,7 +2904,7 @@ posix_utime(PyObject *self, PyObject *args)
|
||||||
done:
|
done:
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
return result;
|
return result;
|
||||||
#else /* Py_WIN_WIDE_FILENAMES */
|
#else /* MS_WINDOWS */
|
||||||
|
|
||||||
char *path = NULL;
|
char *path = NULL;
|
||||||
long atime, mtime, ausec, musec;
|
long atime, mtime, ausec, musec;
|
||||||
|
@ -2985,7 +2978,7 @@ done:
|
||||||
#undef UTIME_ARG
|
#undef UTIME_ARG
|
||||||
#undef ATIME
|
#undef ATIME
|
||||||
#undef MTIME
|
#undef MTIME
|
||||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
#endif /* MS_WINDOWS */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8273,7 +8266,7 @@ win32_startfile(PyObject *self, PyObject *args)
|
||||||
char *filepath;
|
char *filepath;
|
||||||
char *operation = NULL;
|
char *operation = NULL;
|
||||||
HINSTANCE rc;
|
HINSTANCE rc;
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
|
||||||
if (unicode_file_names()) {
|
if (unicode_file_names()) {
|
||||||
PyObject *unipath, *woperation = NULL;
|
PyObject *unipath, *woperation = NULL;
|
||||||
if (!PyArg_ParseTuple(args, "U|s:startfile",
|
if (!PyArg_ParseTuple(args, "U|s:startfile",
|
||||||
|
@ -8308,7 +8301,6 @@ win32_startfile(PyObject *self, PyObject *args)
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
normal:
|
normal:
|
||||||
if (!PyArg_ParseTuple(args, "et|s:startfile",
|
if (!PyArg_ParseTuple(args, "et|s:startfile",
|
||||||
|
@ -8328,7 +8320,7 @@ normal:
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* MS_WINDOWS */
|
||||||
|
|
||||||
#ifdef HAVE_GETLOADAVG
|
#ifdef HAVE_GETLOADAVG
|
||||||
PyDoc_STRVAR(posix_getloadavg__doc__,
|
PyDoc_STRVAR(posix_getloadavg__doc__,
|
||||||
|
|
|
@ -2254,7 +2254,7 @@ file_init(PyObject *self, PyObject *args, PyObject *kwds)
|
||||||
Py_DECREF(closeresult);
|
Py_DECREF(closeresult);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
if (GetVersion() < 0x80000000) { /* On NT, so wide API available */
|
if (GetVersion() < 0x80000000) { /* On NT, so wide API available */
|
||||||
PyObject *po;
|
PyObject *po;
|
||||||
if (PyArg_ParseTupleAndKeywords(args, kwds, "U|si:file",
|
if (PyArg_ParseTupleAndKeywords(args, kwds, "U|si:file",
|
||||||
|
|
|
@ -565,10 +565,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
|
||||||
/* This is enough for unicodeobject.h to do the "right thing" on Windows. */
|
/* This is enough for unicodeobject.h to do the "right thing" on Windows. */
|
||||||
#define Py_UNICODE_SIZE 2
|
#define Py_UNICODE_SIZE 2
|
||||||
|
|
||||||
/* Define to indicate that the Python Unicode representation can be passed
|
|
||||||
as-is to Win32 Wide API. */
|
|
||||||
#define Py_WIN_WIDE_FILENAMES
|
|
||||||
|
|
||||||
/* Use Python's own small-block memory-allocator. */
|
/* Use Python's own small-block memory-allocator. */
|
||||||
#define WITH_PYMALLOC 1
|
#define WITH_PYMALLOC 1
|
||||||
|
|
||||||
|
|
|
@ -379,7 +379,7 @@ PyErr_SetFromErrnoWithFilename(PyObject *exc, char *filename)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
#ifdef MS_WINDOWS
|
||||||
PyObject *
|
PyObject *
|
||||||
PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, Py_UNICODE *filename)
|
PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, Py_UNICODE *filename)
|
||||||
{
|
{
|
||||||
|
@ -390,7 +390,7 @@ PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, Py_UNICODE *filename)
|
||||||
Py_XDECREF(name);
|
Py_XDECREF(name);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
#endif /* MS_WINDOWS */
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
PyErr_SetFromErrno(PyObject *exc)
|
PyErr_SetFromErrno(PyObject *exc)
|
||||||
|
@ -460,7 +460,6 @@ PyObject *PyErr_SetExcFromWindowsErrWithFilename(
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
|
||||||
PyObject *PyErr_SetExcFromWindowsErrWithUnicodeFilename(
|
PyObject *PyErr_SetExcFromWindowsErrWithUnicodeFilename(
|
||||||
PyObject *exc,
|
PyObject *exc,
|
||||||
int ierr,
|
int ierr,
|
||||||
|
@ -475,7 +474,6 @@ PyObject *PyErr_SetExcFromWindowsErrWithUnicodeFilename(
|
||||||
Py_XDECREF(name);
|
Py_XDECREF(name);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
|
||||||
|
|
||||||
PyObject *PyErr_SetExcFromWindowsErr(PyObject *exc, int ierr)
|
PyObject *PyErr_SetExcFromWindowsErr(PyObject *exc, int ierr)
|
||||||
{
|
{
|
||||||
|
@ -499,7 +497,6 @@ PyObject *PyErr_SetFromWindowsErrWithFilename(
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Py_WIN_WIDE_FILENAMES
|
|
||||||
PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
|
PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
|
||||||
int ierr,
|
int ierr,
|
||||||
const Py_UNICODE *filename)
|
const Py_UNICODE *filename)
|
||||||
|
@ -513,7 +510,6 @@ PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
|
||||||
Py_XDECREF(name);
|
Py_XDECREF(name);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
|
||||||
#endif /* MS_WINDOWS */
|
#endif /* MS_WINDOWS */
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue