Merged revisions 72698-72699 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72698 | hirokazu.yamamoto | 2009-05-17 11:52:09 +0900 | 1 line Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more. ........ r72699 | hirokazu.yamamoto | 2009-05-17 11:58:36 +0900 | 1 line Added NEWS for r72698. ........
This commit is contained in:
parent
266c9905df
commit
8223c24d07
|
@ -177,10 +177,10 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromErrno(PyObject *);
|
|||
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenameObject(
|
||||
PyObject *, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename(PyObject *, const char *);
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename(
|
||||
PyObject *, const Py_UNICODE *);
|
||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
||||
#endif /* MS_WINDOWS */
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...);
|
||||
|
||||
|
@ -189,19 +189,15 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilenameObject(
|
|||
int, const char *);
|
||||
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename(
|
||||
int, const char *);
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithUnicodeFilename(
|
||||
int, const Py_UNICODE *);
|
||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
||||
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErr(int);
|
||||
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObject(
|
||||
PyObject *,int, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilename(
|
||||
PyObject *,int, const char *);
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithUnicodeFilename(
|
||||
PyObject *,int, const Py_UNICODE *);
|
||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
||||
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int);
|
||||
#endif /* MS_WINDOWS */
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ What's New in Python 3.1 release candidate 1?
|
|||
Core and Builtins
|
||||
-----------------
|
||||
|
||||
- Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more.
|
||||
|
||||
- Issue #5994: the marshal module now has docstrings.
|
||||
|
||||
- Issue #5981: Fix three minor inf/nan issues in float.fromhex:
|
||||
|
|
|
@ -223,7 +223,7 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
|
|||
PyErr_Clear();
|
||||
}
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
if (GetVersion() < 0x80000000) {
|
||||
/* On NT, so wide API available */
|
||||
if (PyUnicode_Check(nameobj))
|
||||
|
|
|
@ -581,13 +581,13 @@ posix_error_with_filename(char* name)
|
|||
return PyErr_SetFromErrnoWithFilename(PyExc_OSError, name);
|
||||
}
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
static PyObject *
|
||||
posix_error_with_unicode_filename(Py_UNICODE* name)
|
||||
{
|
||||
return PyErr_SetFromErrnoWithUnicodeFilename(PyExc_OSError, name);
|
||||
}
|
||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
||||
#endif /* MS_WINDOWS */
|
||||
|
||||
|
||||
static PyObject *
|
||||
|
@ -615,7 +615,6 @@ win32_error(char* function, char* filename)
|
|||
return PyErr_SetFromWindowsErr(errno);
|
||||
}
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
static PyObject *
|
||||
win32_error_unicode(char* function, Py_UNICODE* filename)
|
||||
{
|
||||
|
@ -644,9 +643,7 @@ convert_to_unicode(PyObject **param)
|
|||
return (*param) != NULL;
|
||||
}
|
||||
|
||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
||||
|
||||
#endif
|
||||
#endif /* MS_WINDOWS */
|
||||
|
||||
#if defined(PYOS_OS2)
|
||||
/**********************************************************************
|
||||
|
@ -745,7 +742,7 @@ posix_fildes(PyObject *fdobj, int (*func)(int))
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
static int
|
||||
unicode_file_names(void)
|
||||
{
|
||||
|
@ -808,7 +805,7 @@ posix_2str(PyObject *args,
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
static PyObject*
|
||||
win32_1str(PyObject* args, char* func,
|
||||
char* format, BOOL (__stdcall *funcA)(LPCSTR),
|
||||
|
@ -1564,7 +1561,6 @@ IsUNCRootA(char *path, int pathlen)
|
|||
#undef ISSLASH
|
||||
}
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
static BOOL
|
||||
IsUNCRootW(Py_UNICODE *path, int pathlen)
|
||||
{
|
||||
|
@ -1587,7 +1583,6 @@ IsUNCRootW(Py_UNICODE *path, int pathlen)
|
|||
|
||||
#undef ISSLASH
|
||||
}
|
||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
||||
#endif /* MS_WINDOWS */
|
||||
|
||||
static PyObject *
|
||||
|
@ -1607,7 +1602,7 @@ posix_do_stat(PyObject *self, PyObject *args,
|
|||
int res;
|
||||
PyObject *result;
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
/* If on wide-character-capable OS see if argument
|
||||
is Unicode and if so use wide API. */
|
||||
if (unicode_file_names()) {
|
||||
|
@ -1670,7 +1665,7 @@ posix_access(PyObject *self, PyObject *args)
|
|||
char *path;
|
||||
int mode;
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
DWORD attr;
|
||||
if (unicode_file_names()) {
|
||||
PyUnicodeObject *po;
|
||||
|
@ -1827,7 +1822,7 @@ posix_chmod(PyObject *self, PyObject *args)
|
|||
char *path = NULL;
|
||||
int i;
|
||||
int res;
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
DWORD attr;
|
||||
if (unicode_file_names()) {
|
||||
PyUnicodeObject *po;
|
||||
|
@ -1878,7 +1873,7 @@ posix_chmod(PyObject *self, PyObject *args)
|
|||
release_bytes(opath);
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
#else /* Py_WIN_WIDE_FILENAMES */
|
||||
#else /* MS_WINDOWS */
|
||||
if (!PyArg_ParseTuple(args, "O&i:chmod", PyUnicode_FSConverter,
|
||||
&opath, &i))
|
||||
return NULL;
|
||||
|
@ -2128,7 +2123,7 @@ posix_getcwd(int use_bytes)
|
|||
char buf[1026];
|
||||
char *res;
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
if (!use_bytes && unicode_file_names()) {
|
||||
wchar_t wbuf[1026];
|
||||
wchar_t *wbuf2 = wbuf;
|
||||
|
@ -2233,7 +2228,6 @@ posix_listdir(PyObject *self, PyObject *args)
|
|||
char *bufptr = namebuf;
|
||||
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
|
||||
is Unicode and if so use wide API. */
|
||||
if (unicode_file_names()) {
|
||||
|
@ -2316,7 +2310,6 @@ posix_listdir(PyObject *self, PyObject *args)
|
|||
are also valid. */
|
||||
PyErr_Clear();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O&:listdir",
|
||||
PyUnicode_FSConverter, &opath))
|
||||
|
@ -2553,7 +2546,7 @@ posix__getfullpathname(PyObject *self, PyObject *args)
|
|||
char *path;
|
||||
char outbuf[MAX_PATH*2];
|
||||
char *temp;
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
if (unicode_file_names()) {
|
||||
PyUnicodeObject *po;
|
||||
if (PyArg_ParseTuple(args, "U|:_getfullpathname", &po)) {
|
||||
|
@ -2615,7 +2608,7 @@ posix_mkdir(PyObject *self, PyObject *args)
|
|||
char *path;
|
||||
int mode = 0777;
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
if (unicode_file_names()) {
|
||||
PyUnicodeObject *po;
|
||||
if (PyArg_ParseTuple(args, "U|i:mkdir", &po, &mode)) {
|
||||
|
@ -2921,7 +2914,7 @@ second form is used, set the access and modified times to the current time.");
|
|||
static PyObject *
|
||||
posix_utime(PyObject *self, PyObject *args)
|
||||
{
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
PyObject *arg;
|
||||
PyUnicodeObject *obwpath;
|
||||
wchar_t *wpath = NULL;
|
||||
|
@ -3001,7 +2994,7 @@ posix_utime(PyObject *self, PyObject *args)
|
|||
done:
|
||||
CloseHandle(hFile);
|
||||
return result;
|
||||
#else /* Py_WIN_WIDE_FILENAMES */
|
||||
#else /* MS_WINDOWS */
|
||||
|
||||
PyObject *opath;
|
||||
char *path;
|
||||
|
@ -3077,7 +3070,7 @@ done:
|
|||
#undef UTIME_ARG
|
||||
#undef ATIME
|
||||
#undef MTIME
|
||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
||||
#endif /* MS_WINDOWS */
|
||||
}
|
||||
|
||||
|
||||
|
@ -6803,7 +6796,7 @@ win32_startfile(PyObject *self, PyObject *args)
|
|||
char *filepath;
|
||||
char *operation = NULL;
|
||||
HINSTANCE rc;
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
|
||||
if (unicode_file_names()) {
|
||||
PyObject *unipath, *woperation = NULL;
|
||||
if (!PyArg_ParseTuple(args, "U|s:startfile",
|
||||
|
@ -6838,7 +6831,6 @@ win32_startfile(PyObject *self, PyObject *args)
|
|||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
#endif
|
||||
|
||||
normal:
|
||||
if (!PyArg_ParseTuple(args, "O&|s:startfile",
|
||||
|
|
|
@ -558,10 +558,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. */
|
||||
#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. */
|
||||
#define WITH_PYMALLOC 1
|
||||
|
||||
|
|
|
@ -461,7 +461,7 @@ PyErr_SetFromErrnoWithFilename(PyObject *exc, const char *filename)
|
|||
return result;
|
||||
}
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
#ifdef MS_WINDOWS
|
||||
PyObject *
|
||||
PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, const Py_UNICODE *filename)
|
||||
{
|
||||
|
@ -472,7 +472,7 @@ PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, const Py_UNICODE *filename)
|
|||
Py_XDECREF(name);
|
||||
return result;
|
||||
}
|
||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
||||
#endif /* MS_WINDOWS */
|
||||
|
||||
PyObject *
|
||||
PyErr_SetFromErrno(PyObject *exc)
|
||||
|
@ -549,7 +549,6 @@ PyObject *PyErr_SetExcFromWindowsErrWithFilename(
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
PyObject *PyErr_SetExcFromWindowsErrWithUnicodeFilename(
|
||||
PyObject *exc,
|
||||
int ierr,
|
||||
|
@ -564,7 +563,6 @@ PyObject *PyErr_SetExcFromWindowsErrWithUnicodeFilename(
|
|||
Py_XDECREF(name);
|
||||
return ret;
|
||||
}
|
||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
||||
|
||||
PyObject *PyErr_SetExcFromWindowsErr(PyObject *exc, int ierr)
|
||||
{
|
||||
|
@ -588,7 +586,6 @@ PyObject *PyErr_SetFromWindowsErrWithFilename(
|
|||
return result;
|
||||
}
|
||||
|
||||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
|
||||
int ierr,
|
||||
const Py_UNICODE *filename)
|
||||
|
@ -602,7 +599,6 @@ PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
|
|||
Py_XDECREF(name);
|
||||
return result;
|
||||
}
|
||||
#endif /* Py_WIN_WIDE_FILENAMES */
|
||||
#endif /* MS_WINDOWS */
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue