summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2015-09-21 17:36:09 (GMT)
committerEric V. Smith <eric@trueblade.com>2015-09-21 17:36:09 (GMT)
commit5567f89c6f51a30034e07d6a4a678caf5b4bbb37 (patch)
treeede3e2937b414d12c78c04a8eaa452d2f1361a1b /Python
parent996572ca3fc6589605ad68b1d3d9c3bc8217a185 (diff)
downloadcpython-5567f89c6f51a30034e07d6a4a678caf5b4bbb37.zip
cpython-5567f89c6f51a30034e07d6a4a678caf5b4bbb37.tar.gz
cpython-5567f89c6f51a30034e07d6a4a678caf5b4bbb37.tar.bz2
Issue #24779: Remove unused rawmode parameter to unicode_decode.
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 735424b..4b2dca4 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -3938,7 +3938,7 @@ decode_utf8(struct compiling *c, const char **sPtr, const char *end)
}
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 @@ decode_unicode(struct compiling *c, const char *s, size_t len, int rawmode, cons
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 @@ parsestr(struct compiling *c, const node *n, int *bytesmode, int *fmode)
}
}
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) */