Skip to content

Commit be17134

Browse files
committed
Fix: did not advance output idx.
1 parent af16886 commit be17134

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,15 @@ UPCALL_ID(__bool__);
102102
case 'y': \
103103
arg = PyTruffle_GetArg(v, kwds, kwdnames, rest_keywords_only); \
104104
if (format[format_idx + 1] == '*') { \
105-
void** p = (void**)PyTruffle_ArgN(output_idx); \
105+
Py_buffer* p = (Py_buffer*)PyTruffle_ArgN(output_idx); \
106106
const char* buf; \
107107
format_idx++; /* skip over '*' */ \
108-
if (getbuffer(arg, (Py_buffer*)p, &buf) < 0) { \
108+
if (getbuffer(arg, p, &buf) < 0) { \
109109
PyErr_Format(PyExc_TypeError, "expected bytes, got %R", Py_TYPE(arg)); \
110110
__return_code__; \
111111
return 0; \
112112
} \
113+
PyTruffle_WriteOut(output_idx, Py_buffer, *p); \
113114
} else if (arg == Py_None) { \
114115
if (c == 'z') { \
115116
PyTruffle_WriteOut(output_idx, const char*, NULL); \

0 commit comments

Comments
 (0)