Skip to content

Commit 25c001c

Browse files
timfelfangerer
authored andcommitted
stop processing after string
1 parent c023fac commit 25c001c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ PyObject* PyTruffle_GetArg(positional_argstack* p, PyObject* kwds, char** kwdnam
5959
out = PyDict_GetItem(kwds, to_sulong(truffle_read_string(kwdname)));
6060
}
6161
}
62-
v->argnum++;
62+
p->argnum++;
6363
return out;
6464
}
6565

@@ -354,16 +354,17 @@ int PyTruffle_Arg_ParseTupleAndKeywords(PyObject *argv, PyObject *kwds, const ch
354354
break;
355355
case ':':
356356
// TODO: adapt error message based on string after this
357-
break;
357+
goto end;
358358
case ';':
359359
// TODO: adapt error message based on string after this
360-
break;
360+
goto end;
361361
default:
362362
PyErr_Format(PyExc_TypeError, "unrecognized format char in arguments parsing: %c", c);
363363
}
364364
c = format[++format_idx];
365365
}
366366

367+
end:
367368
free(v);
368369
return 1;
369370
}

0 commit comments

Comments
 (0)