File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
graalpython/com.oracle.graal.python.cext/src Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,7 @@ PyObject* _Py_BuildValue_SizeT(const char *format, ...) {
251
251
# define APPEND_VALUE (list , value ) PyList_Append(list, value); value_idx++
252
252
253
253
PyObject * (* converter )(void * ) = NULL ;
254
+ char argchar [2 ] = {'\0' };
254
255
unsigned int value_idx = 1 ;
255
256
unsigned int format_idx = 0 ;
256
257
build_stack * v = (build_stack * )calloc (1 , sizeof (build_stack ));
@@ -329,12 +330,12 @@ PyObject* _Py_BuildValue_SizeT(const char *format, ...) {
329
330
APPEND_VALUE (list , (Py_ssize_t )ARG );
330
331
break ;
331
332
case 'c' :
332
- c = (char )ARG ;
333
- APPEND_VALUE (list , PyBytes_FromStringAndSize (& c , 1 ));
333
+ argchar [ 0 ] = (char )ARG ;
334
+ APPEND_VALUE (list , PyBytes_FromStringAndSize (argchar , 1 ));
334
335
break ;
335
336
case 'C' :
336
- c = (char )ARG ;
337
- APPEND_VALUE (list , polyglot_from_string_n ( & c , 1 , "utf-8" ));
337
+ argchar [ 0 ] = (char )ARG ;
338
+ APPEND_VALUE (list , PyTruffle_Unicode_FromString ( argchar ));
338
339
break ;
339
340
case 'd' :
340
341
case 'f' :
You can’t perform that action at this time.
0 commit comments