Skip to content

Commit 033be36

Browse files
remove unnecessary mem leak handling in unary and wrap method 1
1 parent ddf4a6a commit 033be36

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Objects/weakrefobject.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,6 @@ _proxy_unwrap(PyObject **op, int *did_incref)
560560
#define WRAP_UNARY(method, generic) \
561561
static PyObject * \
562562
method(PyObject *proxy) { \
563-
int proxy_incref = 0; \
564563
UNWRAP(proxy); \
565564
PyObject* res = generic(proxy); \
566565
Py_DECREF(proxy); \
@@ -614,7 +613,6 @@ _proxy_unwrap(PyObject **op, int *did_incref)
614613
#define WRAP_METHOD(method, SPECIAL) \
615614
static PyObject * \
616615
method(PyObject *proxy, PyObject *Py_UNUSED(ignored)) { \
617-
int proxy_incref = 0; \
618616
UNWRAP(proxy); \
619617
PyObject* res = PyObject_CallMethodNoArgs(proxy, &_Py_ID(SPECIAL)); \
620618
Py_DECREF(proxy); \

0 commit comments

Comments
 (0)