summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 094ceb7..b19f1b3 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -729,8 +729,7 @@ convert_to_unicode(PyObject **param)
else if (PyUnicode_Check(*param))
/* For a Unicode subtype that's not a Unicode object,
return a true Unicode object with the same data. */
- *param = PyUnicode_FromUnicode(PyUnicode_AS_UNICODE(*param),
- PyUnicode_GET_SIZE(*param));
+ *param = PyUnicode_Copy(*param);
else
*param = PyUnicode_FromEncodedObject(*param,
Py_FileSystemDefaultEncoding,