Skip to content

Commit df34517

Browse files
committed
more unlikely
1 parent 9856dce commit df34517

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypyc/lib-rt/getargs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ vgetargskeywords(PyObject *args, PyObject *kwargs, const char *format,
250250
current_arg = Py_NewRef(PyTuple_GET_ITEM(args, i));
251251
}
252252
else if (nkwargs && i >= pos) {
253-
if (PyDict_GetItemStringRef(kwargs, kwlist[i], &current_arg) < 0) {
253+
if (unlikely(PyDict_GetItemStringRef(kwargs, kwlist[i], &current_arg) < 0)) {
254254
return 0;
255255
}
256256
if (current_arg) {
@@ -371,7 +371,7 @@ vgetargskeywords(PyObject *args, PyObject *kwargs, const char *format,
371371
/* make sure there are no arguments given by name and position */
372372
for (i = pos; i < bound_pos_args && i < len; i++) {
373373
PyObject *current_arg;
374-
if (PyDict_GetItemStringRef(kwargs, kwlist[i], &current_arg) < 0) {
374+
if (unlikely(PyDict_GetItemStringRef(kwargs, kwlist[i], &current_arg) < 0)) {
375375
goto latefail;
376376
}
377377
if (unlikely(current_arg != NULL)) {

0 commit comments

Comments
 (0)