Skip to content

Commit 4784dbe

Browse files
committed
return Py_None as default for keyword variables
1 parent f1aae71 commit 4784dbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ PyObject* get_arg_or_kw(PyObject* argv, PyObject* kwds, char** kwdnames, int arg
4949
}
5050
const char* kwdname = kwdnames[argnum];
5151
void* kwarg = PyDict_GetItem(kwds, to_sulong(truffle_read_string(kwdname)));
52-
if (kwarg == Py_None) {
53-
return NULL;
52+
if (kwarg == NULL) {
53+
return Py_None;
5454
} else {
5555
return kwarg;
5656
}

0 commit comments

Comments
 (0)