File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1638,7 +1638,7 @@ PyUnicode_FSConverter(PyObject* arg, void* addr)
16381638 arg = PyUnicode_FromObject (arg );
16391639 if (!arg )
16401640 return 0 ;
1641- output = PyUnicode_AsEncodedObject (arg ,
1641+ output = PyUnicode_AsEncodedObject (arg ,
16421642 Py_FileSystemDefaultEncoding ,
16431643 "surrogateescape" );
16441644 Py_DECREF (arg );
@@ -1650,14 +1650,8 @@ PyUnicode_FSConverter(PyObject* arg, void* addr)
16501650 return 0 ;
16511651 }
16521652 }
1653- if (PyBytes_Check (output )) {
1654- size = PyBytes_GET_SIZE (output );
1655- data = PyBytes_AS_STRING (output );
1656- }
1657- else {
1658- size = PyByteArray_GET_SIZE (output );
1659- data = PyByteArray_AS_STRING (output );
1660- }
1653+ size = PyBytes_GET_SIZE (output );
1654+ data = PyBytes_AS_STRING (output );
16611655 if (size != strlen (data )) {
16621656 PyErr_SetString (PyExc_TypeError , "embedded NUL character" );
16631657 Py_DECREF (output );
You can’t perform that action at this time.
0 commit comments