File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -766,11 +766,7 @@ PyEval_CallObjectWithKeywords(PyObject *callable,
766
766
assert (!PyErr_Occurred ());
767
767
#endif
768
768
769
- if (args == NULL ) {
770
- return _PyObject_FastCallDict (callable , NULL , 0 , kwargs );
771
- }
772
-
773
- if (!PyTuple_Check (args )) {
769
+ if (args != NULL && !PyTuple_Check (args )) {
774
770
PyErr_SetString (PyExc_TypeError ,
775
771
"argument list must be a tuple" );
776
772
return NULL ;
@@ -782,7 +778,12 @@ PyEval_CallObjectWithKeywords(PyObject *callable,
782
778
return NULL ;
783
779
}
784
780
785
- return PyObject_Call (callable , args , kwargs );
781
+ if (args == NULL ) {
782
+ return _PyObject_FastCallDict (callable , NULL , 0 , kwargs );
783
+ }
784
+ else {
785
+ return PyObject_Call (callable , args , kwargs );
786
+ }
786
787
}
787
788
788
789
You can’t perform that action at this time.
0 commit comments