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
7faeb874
Commit
7faeb874
authored
Mar 14, 2000
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bogus error reporting on strptime: let PyArg_ParseTuple set exception.
Also, wrap long line.
parent
e2a6eaaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
Modules/timemodule.c
Modules/timemodule.c
+4
-5
No files found.
Modules/timemodule.c
View file @
7faeb874
...
...
@@ -373,7 +373,8 @@ time_strftime(self, args)
memset
((
ANY
*
)
&
buf
,
'\0'
,
sizeof
(
buf
));
if
(
!
PyArg_ParseTuple
(
args
,
"sO:strftime"
,
&
fmt
,
&
tup
)
||
!
gettmarg
(
tup
,
&
buf
))
if
(
!
PyArg_ParseTuple
(
args
,
"sO:strftime"
,
&
fmt
,
&
tup
)
||
!
gettmarg
(
tup
,
&
buf
))
return
NULL
;
fmtlen
=
strlen
(
fmt
);
...
...
@@ -421,10 +422,8 @@ time_strptime(self, args)
char
*
buf
;
char
*
s
;
if
(
!
PyArg_ParseTuple
(
args
,
"s|s:strptime"
,
&
buf
,
&
fmt
))
{
PyErr_SetString
(
PyExc_ValueError
,
"invalid argument"
);
return
NULL
;
}
if
(
!
PyArg_ParseTuple
(
args
,
"s|s:strptime"
,
&
buf
,
&
fmt
))
return
NULL
;
memset
((
ANY
*
)
&
tm
,
'\0'
,
sizeof
(
tm
));
s
=
strptime
(
buf
,
fmt
,
&
tm
);
if
(
s
==
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