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.

Title: bogus NULL check in PyCapsule
Type: Stage:
Components: Interpreter Core Versions: Python 3.1
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, bkramer
Priority: normal Keywords: patch

Created on 2009-06-28 09:34 by bkramer, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
capsulecompare.patch bkramer, 2009-06-28 09:34 proposed patch
Messages (2)
msg89769 - (view) Author: Benjamin Kramer (bkramer) Date: 2009-06-28 09:34
Objects/capsule.c contains the following code:

if (!name1 || !name2) {
    /* they're only the same if they're both NULL. */
    return name2 == name2;

The result of this comparison will always be true. The comment says it 
should be 'name1 == name2'.
msg89777 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-06-28 16:24
Thanks for the patch! Fixed in r73618.
Date User Action Args
2022-04-11 14:56:50adminsetgithub: 50604
2009-06-28 16:24:15benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg89777

resolution: fixed
2009-06-28 09:34:36bkramercreate