mirror of https://github.com/python/cpython
Remove an unnecessary check for NULL.
This commit is contained in:
parent
6c4bce3b5c
commit
31f4d1fa4b
|
@ -233,15 +233,14 @@ proxy_checkref(PyWeakReference *proxy)
|
||||||
return generic(x, y); \
|
return generic(x, y); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note that the second and third args need to be checked for NULL since
|
/* Note that the third arg needs to be checked for NULL since the tp_call
|
||||||
* (at least) the tp_call slot can receive NULL for either of those args.
|
* slot can receive NULL for this arg.
|
||||||
*/
|
*/
|
||||||
#define WRAP_TERNARY(method, generic) \
|
#define WRAP_TERNARY(method, generic) \
|
||||||
static PyObject * \
|
static PyObject * \
|
||||||
method(PyObject *proxy, PyObject *v, PyObject *w) { \
|
method(PyObject *proxy, PyObject *v, PyObject *w) { \
|
||||||
UNWRAP(proxy); \
|
UNWRAP(proxy); \
|
||||||
if (v != NULL) \
|
UNWRAP(v); \
|
||||||
UNWRAP(v); \
|
|
||||||
if (w != NULL) \
|
if (w != NULL) \
|
||||||
UNWRAP(w); \
|
UNWRAP(w); \
|
||||||
return generic(proxy, v, w); \
|
return generic(proxy, v, w); \
|
||||||
|
|
Loading…
Reference in New Issue