Issue 1020185: Py_CLEAR to implicitly cast its argument to PyObject * (original) (raw)

Issue1020185

Created on 2004-09-01 05:33 by ddorfman, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pyclearcast.diff ddorfman,2004-09-01 05:33 Diff against object.h
Messages (2)
msg46818 - (view) Author: Dima Dorfman (ddorfman) Date: 2004-09-01 05:33
Py_CLEAR assigns its argument to a PyObject pointer without a cast. This causes a warning if the argument is PyObject- compatible but not actually a PyObject. The other reference counting macros accept non-PyObjects without a cast by the user, so Py_CLEAR should too. The patch is hard to read since it realigns the backslashes on the macro. diff -b (ignore whitespace) is good in these cases.
msg46819 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2004-09-01 07:16
Logged In: YES user_id=80475 Accepted and applied (without re-aligning the backslashes).
History
Date User Action Args
2022-04-11 14:56:06 admin set github: 40852
2004-09-01 05:33:01 ddorfman create