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
8b91edad
Commit
8b91edad
authored
Mar 10, 2019
by
sth
Committed by
Serhiy Storchaka
Mar 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-36251: Fix format strings used in match_repr() and stdprinter_repr(). (GH-12252)
parent
ca7fe506
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
Misc/NEWS.d/next/Library/2019-03-09-18-01-24.bpo-36251.zOp9l0.rst
...S.d/next/Library/2019-03-09-18-01-24.bpo-36251.zOp9l0.rst
+2
-0
Modules/_sre.c
Modules/_sre.c
+1
-1
Objects/fileobject.c
Objects/fileobject.c
+1
-1
No files found.
Misc/NEWS.d/next/Library/2019-03-09-18-01-24.bpo-36251.zOp9l0.rst
0 → 100644
View file @
8b91edad
Fix format strings used for stderrprinter and re.Match reprs. Patch by
Stephan Hohe.
Modules/_sre.c
View file @
8b91edad
...
...
@@ -2306,7 +2306,7 @@ match_repr(MatchObject *self)
if
(
group0
==
NULL
)
return
NULL
;
result
=
PyUnicode_FromFormat
(
"<%s object; span=(%
d, %
d), match=%.50R>"
,
"<%s object; span=(%
zd, %z
d), match=%.50R>"
,
Py_TYPE
(
self
)
->
tp_name
,
self
->
mark
[
0
],
self
->
mark
[
1
],
group0
);
Py_DECREF
(
group0
);
...
...
Objects/fileobject.c
View file @
8b91edad
...
...
@@ -411,7 +411,7 @@ stdprinter_fileno(PyStdPrinter_Object *self, PyObject *Py_UNUSED(ignored))
static
PyObject
*
stdprinter_repr
(
PyStdPrinter_Object
*
self
)
{
return
PyUnicode_FromFormat
(
"<stdprinter(fd=%d) object at
0x%x
>"
,
return
PyUnicode_FromFormat
(
"<stdprinter(fd=%d) object at
%p
>"
,
self
->
fd
,
self
);
}
...
...
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