diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-07 16:34:53 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-07 16:34:53 (GMT) |
commit | 97c18ab6a52774364511bb5e4bf0444af4e700b9 (patch) | |
tree | 5e14ba30e2d38f4813d027b4a391460d8fdfcc85 /Modules/spwdmodule.c | |
parent | 56fdb7545363c5b1e2987b08fa9b271dd289ce66 (diff) | |
download | cpython-97c18ab6a52774364511bb5e4bf0444af4e700b9.zip cpython-97c18ab6a52774364511bb5e4bf0444af4e700b9.tar.gz cpython-97c18ab6a52774364511bb5e4bf0444af4e700b9.tar.bz2 |
Replace PyUnicode_Decode(buf, strlen(buf), Py_FileSystemDefaultEncoding,
"surrogateescape") by PyUnicode_DecodeFSDefault(val).
Diffstat (limited to 'Modules/spwdmodule.c')
-rw-r--r-- | Modules/spwdmodule.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/spwdmodule.c b/Modules/spwdmodule.c index 230b57c..422ab03 100644 --- a/Modules/spwdmodule.c +++ b/Modules/spwdmodule.c @@ -60,9 +60,7 @@ static void sets(PyObject *v, int i, const char* val) { if (val) { - PyObject *o = PyUnicode_Decode(val, strlen(val), - Py_FileSystemDefaultEncoding, - "surrogateescape"); + PyObject *o = PyUnicode_DecodeFSDefault(val); PyStructSequence_SET_ITEM(v, i, o); } else { PyStructSequence_SET_ITEM(v, i, Py_None); |