Skip to content

Commit 097987f

Browse files
committed
Fix: Convert 'NULL' to 'None' for 'PySet_New'.
1 parent 4e47c22 commit 097987f

File tree

1 file changed

+2
-2
lines changed
  • graalpython/com.oracle.graal.python.cext/src

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -45,7 +45,7 @@ PyTypeObject PyFrozenSet_Type = PY_TRUFFLE_TYPE("frozenset", &PyType_Type, Py_TP
4545

4646
UPCALL_ID(PySet_New);
4747
PyObject * PySet_New(PyObject *iterable) {
48-
return UPCALL_CEXT_O(_jls_PySet_New, native_to_java(iterable));
48+
return UPCALL_CEXT_O(_jls_PySet_New, native_to_java(iterable != NULL ? iterable : Py_None));
4949
}
5050

5151
UPCALL_ID(PyFrozenSet_New);

0 commit comments

Comments
 (0)