Skip to content

Commit c8dcf95

Browse files
committed
make sure to append PyObjects to our built value
1 parent d381c7a commit c8dcf95

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -307,27 +307,27 @@ PyObject* _Py_BuildValue_SizeT(const char *format, ...) {
307307
case 'i':
308308
case 'b':
309309
case 'h':
310-
APPEND_VALUE(list,PyLong_FromLong((int)ARG));
310+
APPEND_VALUE(list, PyLong_FromLong((int)ARG));
311311
break;
312312
case 'l':
313-
APPEND_VALUE(list, (long)ARG);
313+
APPEND_VALUE(list, PyLong_FromLong((long)ARG));
314314
break;
315315
case 'B':
316316
case 'H':
317317
case 'I':
318-
APPEND_VALUE(list, (unsigned int)ARG);
318+
APPEND_VALUE(list, PyLong_FromUnsignedLong((unsigned int)ARG));
319319
break;
320320
case 'k':
321-
APPEND_VALUE(list, (unsigned long)ARG);
321+
APPEND_VALUE(list, PyLong_FromUnsignedLong((unsigned long)ARG));
322322
break;
323323
case 'L':
324-
APPEND_VALUE(list, (long long)ARG);
324+
APPEND_VALUE(list, PyLong_FromLongLong((long long)ARG));
325325
break;
326326
case 'K':
327-
APPEND_VALUE(list, (unsigned long long)ARG);
327+
APPEND_VALUE(list, PyLong_FromLongLong((unsigned long long)ARG));
328328
break;
329329
case 'n':
330-
APPEND_VALUE(list, (Py_ssize_t)ARG);
330+
APPEND_VALUE(list, PyLong_FromSsize_t((Py_ssize_t)ARG));
331331
break;
332332
case 'c':
333333
argchar[0] = (char)ARG;

0 commit comments

Comments
 (0)