Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(199)

Unified Diff: Python/pythonrun.c

Issue 767: [issue2630] repr() should not escape non-ASCII characters (Closed) SVN Base: http://svn.python.org/view/*checkout*/python/branches/py3k/
Patch Set: Created 5 months, 1 week ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: Python/pythonrun.c
===================================================================
--- Python/pythonrun.c (revision 62744)
+++ Python/pythonrun.c (working copy)
@@ -764,8 +764,8 @@
#endif
}
else {
- if (!(std = PyFile_FromFd(fd, "<stdout>", "w", -1, NULL, NULL,
- "\n", 0))) {
+ if (!(std = PyFile_FromFd(fd, "<stdout>", "w", -1, NULL,
+ "backslashreplace", "\n", 0))) {
goto error;
}
} /* if (fd < 0) */
@@ -785,8 +785,8 @@
#endif
}
else {
- if (!(std = PyFile_FromFd(fd, "<stderr>", "w", -1, NULL, NULL,
- "\n", 0))) {
+ if (!(std = PyFile_FromFd(fd, "<stderr>", "w", -1, NULL,
+ "backslashreplace", "\n", 0))) {
goto error;
}
} /* if (fd < 0) */

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r338