[Patches] [ python-Patches-1020185 ] Py_CLEAR to implicitly cast its argument to PyObject *

SourceForge.net noreply at sourceforge.net
Wed Sep 1 09:16:34 CEST 2004


Patches item #1020185, was opened at 2004-09-01 00:33
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1020185&group_id=5470

Category: Core (C code)
>Group: Python 2.4
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Dima Dorfman (ddorfman)
Assigned to: Nobody/Anonymous (nobody)
Summary: Py_CLEAR to implicitly cast its argument to PyObject *

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2004-09-01 02:16

Message:
Logged In: YES 
user_id=80475

Accepted and applied (without re-aligning the backslashes).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1020185&group_id=5470


More information about the Patches mailing list