Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a3c56090
Commit
a3c56090
authored
Jun 28, 2009
by
Hirokazu Yamamoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #4856: Remove checks for win NT.
parent
ecb4f953
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
277 additions
and
354 deletions
+277
-354
Misc/NEWS
Misc/NEWS
+2
-0
Modules/_io/fileio.c
Modules/_io/fileio.c
+2
-5
Modules/posixmodule.c
Modules/posixmodule.c
+262
-324
Objects/fileobject.c
Objects/fileobject.c
+11
-19
PC/pyconfig.h
PC/pyconfig.h
+0
-6
No files found.
Misc/NEWS
View file @
a3c56090
...
...
@@ -12,6 +12,8 @@ What's New in Python 2.7 alpha 1
Core and Builtins
-----------------
- Issue #4856: Remove checks for win NT.
- Issue #2016: Fixed a crash in a corner case where the dictionary of keyword
arguments could be modified during the function call setup.
...
...
Modules/_io/fileio.c
View file @
a3c56090
...
...
@@ -224,11 +224,8 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
}
#ifdef MS_WINDOWS
if
(
GetVersion
()
<
0x80000000
)
{
/* On NT, so wide API available */
if
(
PyUnicode_Check
(
nameobj
))
widename
=
PyUnicode_AS_UNICODE
(
nameobj
);
}
if
(
PyUnicode_Check
(
nameobj
))
widename
=
PyUnicode_AS_UNICODE
(
nameobj
);
if
(
widename
==
NULL
)
#endif
if
(
fd
<
0
)
...
...
Modules/posixmodule.c
View file @
a3c56090
This diff is collapsed.
Click to expand it.
Objects/fileobject.c
View file @
a3c56090
...
...
@@ -16,12 +16,6 @@
#include <windows.h>
#endif
#ifdef _MSC_VER
/* Need GetVersion to see if on NT so safe to use _wfopen */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
/* _MSC_VER */
#if defined(PYOS_OS2) && defined(PYCC_GCC)
#include <io.h>
#endif
...
...
@@ -2244,6 +2238,7 @@ file_init(PyObject *self, PyObject *args, PyObject *kwds)
char
*
mode
=
"r"
;
int
bufsize
=
-
1
;
int
wideargument
=
0
;
PyObject
*
po
;
assert
(
PyFile_Check
(
self
));
if
(
foself
->
f_fp
!=
NULL
)
{
...
...
@@ -2255,19 +2250,16 @@ file_init(PyObject *self, PyObject *args, PyObject *kwds)
}
#ifdef MS_WINDOWS
if
(
GetVersion
()
<
0x80000000
)
{
/* On NT, so wide API available */
PyObject
*
po
;
if
(
PyArg_ParseTupleAndKeywords
(
args
,
kwds
,
"U|si:file"
,
kwlist
,
&
po
,
&
mode
,
&
bufsize
))
{
wideargument
=
1
;
if
(
fill_file_fields
(
foself
,
NULL
,
po
,
mode
,
fclose
)
==
NULL
)
goto
Error
;
}
else
{
/* Drop the argument parsing error as narrow
strings are also valid. */
PyErr_Clear
();
}
if
(
PyArg_ParseTupleAndKeywords
(
args
,
kwds
,
"U|si:file"
,
kwlist
,
&
po
,
&
mode
,
&
bufsize
))
{
wideargument
=
1
;
if
(
fill_file_fields
(
foself
,
NULL
,
po
,
mode
,
fclose
)
==
NULL
)
goto
Error
;
}
else
{
/* Drop the argument parsing error as narrow
strings are also valid. */
PyErr_Clear
();
}
#endif
...
...
PC/pyconfig.h
View file @
a3c56090
...
...
@@ -95,12 +95,6 @@ WIN32 is still required for the locale module.
#endif
#ifdef MS_WINCE
/* Python uses GetVersion() to distinguish between
* Windows NT and 9x/ME where OS Unicode support is concerned.
* Windows CE supports Unicode in the same way as NT so we
* define the missing GetVersion() accordingly.
*/
#define GetVersion() (4)
/* Windows CE does not support environment variables */
#define getenv(v) (NULL)
#define environ (NULL)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment