Skip to content

Commit d22f8c7

Browse files
fangerertimfel
authored andcommitted
Use Py_FatalError instead of exit(-1)
1 parent 9e1203a commit d22f8c7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

graalpython/com.oracle.graal.python.jni/src/capi_native.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,7 @@ PyAPI_FUNC(PyObject *) PyObject_CallFunctionObjArgs(PyObject *callable, ...) {
493493
}
494494
// test if buffer was too small
495495
if (arg != NULL) {
496-
fprintf(stderr, "argument buffer for 'PyObject_CallFunctionObjArgs' is too small");
497-
exit(-1);
496+
Py_FatalError("argument buffer for 'PyObject_CallFunctionObjArgs' is too small");
498497
}
499498
PyObject* args = PyTuple_New(count);
500499
for (int i = 0; i < count; i++) {
@@ -535,8 +534,7 @@ PyObject * PyObject_CallMethodObjArgs(PyObject *obj, PyObject *name, ...) {
535534
}
536535
// test if buffer was too small
537536
if (arg != NULL) {
538-
fprintf(stderr, "argument buffer for 'PyObject_CallMethodObjArgs' is too small");
539-
exit(-1);
537+
Py_FatalError("argument buffer for 'PyObject_CallMethodObjArgs' is too small");
540538
}
541539
PyObject* args = PyTuple_New(count);
542540
for (int i = 0; i < count; i++) {

0 commit comments

Comments
 (0)