[Python-checkins] r72701 - in python/branches/py3k: Include/pyerrors.h Misc/NEWS Modules/_io/fileio.c Modules/posixmodule.c PC/pyconfig.h Python/errors.c
hirokazu.yamamoto
python-checkins at python.org
Sun May 17 06:21:53 CEST 2009
Author: hirokazu.yamamoto
Date: Sun May 17 06:21:53 2009
New Revision: 72701
Log:
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.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Include/pyerrors.h
python/branches/py3k/Misc/NEWS
python/branches/py3k/Modules/_io/fileio.c
python/branches/py3k/Modules/posixmodule.c
python/branches/py3k/PC/pyconfig.h
python/branches/py3k/Python/errors.c
Modified: python/branches/py3k/Include/pyerrors.h
==============================================================================
--- python/branches/py3k/Include/pyerrors.h (original)
+++ python/branches/py3k/Include/pyerrors.h Sun May 17 06:21:53 2009
@@ -177,10 +177,10 @@
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 @@
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 */
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Sun May 17 06:21:53 2009
@@ -12,6 +12,8 @@
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:
Modified: python/branches/py3k/Modules/_io/fileio.c
==============================================================================
--- python/branches/py3k/Modules/_io/fileio.c (original)
+++ python/branches/py3k/Modules/_io/fileio.c Sun May 17 06:21:53 2009
@@ -223,7 +223,7 @@
PyErr_Clear();
}
-#ifdef Py_WIN_WIDE_FILENAMES
+#ifdef MS_WINDOWS
if (GetVersion() < 0x80000000) {
/* On NT, so wide API available */
if (PyUnicode_Check(nameobj))
Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c (original)
+++ python/branches/py3k/Modules/posixmodule.c Sun May 17 06:21:53 2009
@@ -581,13 +581,13 @@
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 @@
return PyErr_SetFromWindowsErr(errno);
}
-#ifdef Py_WIN_WIDE_FILENAMES
static PyObject *
win32_error_unicode(char* function, Py_UNICODE* filename)
{
@@ -644,9 +643,7 @@
return (*param) != NULL;
}
-#endif /* Py_WIN_WIDE_FILENAMES */
-
-#endif
+#endif /* MS_WINDOWS */
#if defined(PYOS_OS2)
/**********************************************************************
@@ -745,7 +742,7 @@
return Py_None;
}
-#ifdef Py_WIN_WIDE_FILENAMES
+#ifdef MS_WINDOWS
static int
unicode_file_names(void)
{
@@ -808,7 +805,7 @@
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 @@
#undef ISSLASH
}
-#ifdef Py_WIN_WIDE_FILENAMES
static BOOL
IsUNCRootW(Py_UNICODE *path, int pathlen)
{
@@ -1587,7 +1583,6 @@
#undef ISSLASH
}
-#endif /* Py_WIN_WIDE_FILENAMES */
#endif /* MS_WINDOWS */
static PyObject *
@@ -1607,7 +1602,7 @@
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 @@
char *path;
int mode;
-#ifdef Py_WIN_WIDE_FILENAMES
+#ifdef MS_WINDOWS
DWORD attr;
if (unicode_file_names()) {
PyUnicodeObject *po;
@@ -1827,7 +1822,7 @@
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 @@
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 @@
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 @@
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 @@
are also valid. */
PyErr_Clear();
}
-#endif
if (!PyArg_ParseTuple(args, "O&:listdir",
PyUnicode_FSConverter, &opath))
@@ -2553,7 +2546,7 @@
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 @@
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 @@
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 @@
done:
CloseHandle(hFile);
return result;
-#else /* Py_WIN_WIDE_FILENAMES */
+#else /* MS_WINDOWS */
PyObject *opath;
char *path;
@@ -3077,7 +3070,7 @@
#undef UTIME_ARG
#undef ATIME
#undef MTIME
-#endif /* Py_WIN_WIDE_FILENAMES */
+#endif /* MS_WINDOWS */
}
@@ -6803,7 +6796,7 @@
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 @@
Py_INCREF(Py_None);
return Py_None;
}
-#endif
normal:
if (!PyArg_ParseTuple(args, "O&|s:startfile",
Modified: python/branches/py3k/PC/pyconfig.h
==============================================================================
--- python/branches/py3k/PC/pyconfig.h (original)
+++ python/branches/py3k/PC/pyconfig.h Sun May 17 06:21:53 2009
@@ -558,10 +558,6 @@
/* 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
Modified: python/branches/py3k/Python/errors.c
==============================================================================
--- python/branches/py3k/Python/errors.c (original)
+++ python/branches/py3k/Python/errors.c Sun May 17 06:21:53 2009
@@ -461,7 +461,7 @@
return result;
}
-#ifdef Py_WIN_WIDE_FILENAMES
+#ifdef MS_WINDOWS
PyObject *
PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, const Py_UNICODE *filename)
{
@@ -472,7 +472,7 @@
Py_XDECREF(name);
return result;
}
-#endif /* Py_WIN_WIDE_FILENAMES */
+#endif /* MS_WINDOWS */
PyObject *
PyErr_SetFromErrno(PyObject *exc)
@@ -549,7 +549,6 @@
return ret;
}
-#ifdef Py_WIN_WIDE_FILENAMES
PyObject *PyErr_SetExcFromWindowsErrWithUnicodeFilename(
PyObject *exc,
int ierr,
@@ -564,7 +563,6 @@
Py_XDECREF(name);
return ret;
}
-#endif /* Py_WIN_WIDE_FILENAMES */
PyObject *PyErr_SetExcFromWindowsErr(PyObject *exc, int ierr)
{
@@ -588,7 +586,6 @@
return result;
}
-#ifdef Py_WIN_WIDE_FILENAMES
PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
int ierr,
const Py_UNICODE *filename)
@@ -602,7 +599,6 @@
Py_XDECREF(name);
return result;
}
-#endif /* Py_WIN_WIDE_FILENAMES */
#endif /* MS_WINDOWS */
void
More information about the Python-checkins
mailing list