This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Py_CLEAR to implicitly cast its argument to PyObject *
Type: Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: ddorfman, rhettinger
Priority: normal Keywords: patch

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:06adminsetgithub: 40852
2004-09-01 05:33:01ddorfmancreate