File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
graalpython/com.oracle.graal.python.cext/src Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -141,15 +141,21 @@ Py_ssize_t PyObject_Size(PyObject *o) {
141
141
142
142
UPCALL_ID (PyObject_Str );
143
143
PyObject * PyObject_Str (PyObject * o ) {
144
+ if (o == NULL )
145
+ return PyUnicode_FromString ("<NULL>" );
144
146
return UPCALL_CEXT_O (_jls_PyObject_Str , native_to_java (o ));
145
147
}
146
148
147
149
PyObject * PyObject_ASCII (PyObject * o ) {
150
+ if (o == NULL )
151
+ return PyUnicode_FromString ("<NULL>" );
148
152
return UPCALL_O (PY_BUILTIN , polyglot_from_string ("ascii" , SRC_CS ), native_to_java (o ));
149
153
}
150
154
151
155
UPCALL_ID (PyObject_Repr );
152
156
PyObject * PyObject_Repr (PyObject * o ) {
157
+ if (o == NULL )
158
+ return PyUnicode_FromString ("<NULL>" );
153
159
return UPCALL_CEXT_O (_jls_PyObject_Repr , native_to_java (o ));
154
160
}
155
161
You can’t perform that action at this time.
0 commit comments