diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-09-30 00:26:44 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-09-30 00:26:44 (GMT) |
commit | 034f6cf10c53f11cdb0f1fd42d279122cdb8ebaf (patch) | |
tree | d38f9fe89e3057467f603a93cf3826c9515db009 /Modules/posixmodule.c | |
parent | b153615008570cffb2e5a782d96c2b79db51ea02 (diff) | |
download | cpython-034f6cf10c53f11cdb0f1fd42d279122cdb8ebaf.zip cpython-034f6cf10c53f11cdb0f1fd42d279122cdb8ebaf.tar.gz cpython-034f6cf10c53f11cdb0f1fd42d279122cdb8ebaf.tar.bz2 |
Add PyUnicode_Copy() function, include it to the public API
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 3 |
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, |