Skip to content

Commit 75f9a4d

Browse files
committed
actually append unicode strings
1 parent e40da5e commit 75f9a4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,15 @@ PyObject* _Py_BuildValue_SizeT(const char *format, ...) {
272272
if (ARG == NULL) {
273273
APPEND_VALUE(list, Py_None);
274274
} else {
275-
APPEND_VALUE(list, polyglot_from_string_n((char*)ARG, size, "utf-8"));
275+
APPEND_VALUE(list, PyUnicode_FromStringAndSize((char*)ARG, size));
276276
}
277277
value_idx++; // skip length argument
278278
format_idx++;
279279
} else {
280280
if (ARG == NULL) {
281281
APPEND_VALUE(list, Py_None);
282282
} else {
283-
APPEND_VALUE(list, polyglot_from_string((char*)ARG, "utf-8"));
283+
APPEND_VALUE(list, PyUnicode_FromString((char*)ARG));
284284
}
285285
}
286286
break;

0 commit comments

Comments
 (0)