Skip to content

Commit b1b2071

Browse files
authored
Optimize PyWeakref_GetRef() (#129)
1 parent 79404e9 commit b1b2071

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: pythoncapi_compat.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static inline int PyWeakref_GetRef(PyObject *ref, PyObject **pobj)
583583
return 0;
584584
}
585585
*pobj = Py_NewRef(obj);
586-
return (*pobj != NULL);
586+
return 1;
587587
}
588588
#endif
589589

0 commit comments

Comments
 (0)