mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
use NULL not 0
This commit is contained in:
parent
297d104248
commit
1791c224dd
1 changed files with 6 additions and 9 deletions
|
@ -2191,9 +2191,8 @@ PyObject_CallMethod(PyObject *o, const char *name, const char *format, ...)
|
|||
return null_error();
|
||||
|
||||
func = PyObject_GetAttrString(o, name);
|
||||
if (func == NULL) {
|
||||
return 0;
|
||||
}
|
||||
if (func == NULL)
|
||||
return NULL;
|
||||
|
||||
va_start(va, format);
|
||||
retval = callmethod(func, format, va, 0);
|
||||
|
@ -2213,9 +2212,8 @@ _PyObject_CallMethodId(PyObject *o, _Py_Identifier *name,
|
|||
return null_error();
|
||||
|
||||
func = _PyObject_GetAttrId(o, name);
|
||||
if (func == NULL) {
|
||||
return 0;
|
||||
}
|
||||
if (func == NULL)
|
||||
return NULL;
|
||||
|
||||
va_start(va, format);
|
||||
retval = callmethod(func, format, va, 0);
|
||||
|
@ -2235,9 +2233,8 @@ _PyObject_CallMethod_SizeT(PyObject *o, const char *name,
|
|||
return null_error();
|
||||
|
||||
func = PyObject_GetAttrString(o, name);
|
||||
if (func == NULL) {
|
||||
return 0;
|
||||
}
|
||||
if (func == NULL)
|
||||
return NULL;
|
||||
va_start(va, format);
|
||||
retval = callmethod(func, format, va, 1);
|
||||
va_end(va);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue