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
b0d5b5d3
Commit
b0d5b5d3
authored
Nov 07, 2011
by
Brian Curtin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust None handling to be a bit more clean. Thanks to Benjamin
for pointing it out.
parent
e2618f34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Modules/posixmodule.c
Modules/posixmodule.c
+4
-4
No files found.
Modules/posixmodule.c
View file @
b0d5b5d3
...
...
@@ -3543,7 +3543,7 @@ static PyObject *
posix_utime
(
PyObject
*
self
,
PyObject
*
args
)
{
#ifdef MS_WINDOWS
PyObject
*
arg
=
NULL
;
PyObject
*
arg
=
Py_None
;
PyObject
*
obwpath
;
wchar_t
*
wpath
=
NULL
;
PyObject
*
oapath
;
...
...
@@ -3589,7 +3589,7 @@ posix_utime(PyObject *self, PyObject *args)
Py_DECREF
(
oapath
);
}
if
(
!
arg
||
(
arg
==
Py_None
)
)
{
if
(
arg
==
Py_None
)
{
SYSTEMTIME
now
;
GetSystemTime
(
&
now
);
if
(
!
SystemTimeToFileTime
(
&
now
,
&
mtime
)
||
...
...
@@ -3633,13 +3633,13 @@ done:
time_t
atime
,
mtime
;
long
ausec
,
musec
;
int
res
;
PyObject
*
arg
=
NULL
;
PyObject
*
arg
=
Py_None
;
if
(
!
PyArg_ParseTuple
(
args
,
"O&|O:utime"
,
PyUnicode_FSConverter
,
&
opath
,
&
arg
))
return
NULL
;
path
=
PyBytes_AsString
(
opath
);
if
(
!
arg
||
(
arg
==
Py_None
)
)
{
if
(
arg
==
Py_None
)
{
/* optional time values not given */
Py_BEGIN_ALLOW_THREADS
res
=
utime
(
path
,
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