[Python-checkins] cpython: Issue #24779: Remove unused rawmode parameter to unicode_decode.
eric.smith
python-checkins at python.org
Mon Sep 21 19:36:18 CEST 2015
https://hg.python.org/cpython/rev/5230115de64d
changeset: 98141:5230115de64d
user: Eric V. Smith <eric at trueblade.com>
date: Mon Sep 21 13:36:09 2015 -0400
summary:
Issue #24779: Remove unused rawmode parameter to unicode_decode.
files:
Python/ast.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Python/ast.c b/Python/ast.c
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -3938,7 +3938,7 @@
}
static PyObject *
-decode_unicode(struct compiling *c, const char *s, size_t len, int rawmode, const char *encoding)
+decode_unicode(struct compiling *c, const char *s, size_t len, const char *encoding)
{
PyObject *v, *u;
char *buf;
@@ -3994,10 +3994,7 @@
len = p - buf;
s = buf;
}
- if (rawmode)
- v = PyUnicode_DecodeRawUnicodeEscape(s, len, NULL);
- else
- v = PyUnicode_DecodeUnicodeEscape(s, len, NULL);
+ v = PyUnicode_DecodeUnicodeEscape(s, len, NULL);
Py_XDECREF(u);
return v;
}
@@ -4896,7 +4893,7 @@
}
}
if (!*bytesmode && !rawmode) {
- return decode_unicode(c, s, len, rawmode, c->c_encoding);
+ return decode_unicode(c, s, len, c->c_encoding);
}
if (*bytesmode) {
/* Disallow non-ascii characters (but not escapes) */
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list