Skip to content

Commit f1aae71

Browse files
committed
fix getting the output variable
1 parent 88d46a5 commit f1aae71

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
@@ -95,7 +95,7 @@ int PyTruffle_Arg_ParseTupleAndKeywords(PyObject *argv, PyObject *kwds, const ch
9595
# define PEEKFMT format[formatn]
9696
# define POPFMT format[formatn++]
9797
# define POPARG get_arg_or_kw(argv, kwds, kwdnames, valuen++, rest_optional, rest_keywords)
98-
# define POPOUTPUTVARIABLE ARG(outputn++)
98+
# define POPOUTPUTVARIABLE ARG(outputn); outputn++
9999

100100
int max = strlen(format);
101101
while (outputn < outc) {
@@ -193,7 +193,8 @@ int PyTruffle_Arg_ParseTupleAndKeywords(PyObject *argv, PyObject *kwds, const ch
193193
POPFMT;
194194
void* (*converter)(PyObject*,void*) = POPOUTPUTVARIABLE;
195195
PyObject* arg = POPARG;
196-
int status = converter(arg, POPOUTPUTVARIABLE);
196+
void* output = POPOUTPUTVARIABLE;
197+
int status = converter(arg, output);
197198
if (!status) { // converter should have set exception
198199
return NULL;
199200
}

0 commit comments

Comments
 (0)