Skip to content

Commit bb1adf1

Browse files
committed
Fix conversion in PyErr_SetFromErrnoWithFilenameObjects
1 parent 1da3fa3 commit bb1adf1

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python.cext/src

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python.cext/src/errors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ PyObject* PyErr_SetFromErrnoWithFilenameObjects(PyObject* exc, PyObject* filenam
223223
char *s = strerror(i);
224224
// TODO(fa): use PyUnicode_DecodeLocale once available
225225
// message = PyUnicode_DecodeLocale(s, "surrogateescape");
226-
message = polyglot_from_string(s, SRC_CS);
226+
message = PyUnicode_FromString(s);
227227
}
228228
else {
229229
/* Sometimes errno didn't get set */

0 commit comments

Comments
 (0)