Skip to content

gh-94185: Fix PyObject_NEW and PyObject_NEW_VAR - #94186

Closed
trcrsired wants to merge 5 commits into
python:mainfrom
trcrsired:main
Closed

trcrsired wants to merge 5 commits into
python:mainfrom
trcrsired:main

Conversation

@trcrsired

@trcrsired trcrsired commented Jun 23, 2022 •

Copy link
Copy Markdown

The commit 7ad6f74 tried to add brackets to tons of macros, but they break PyObject_New and PyObject_NEW_VAR since the macro would expand to ((Type)*) which breaks compilation for those CPython headers.

Fix the issue 94185.

… pair

The problem is that ((type) *) is not working. Randomly adding brackets to macros are not going to work
@ghost

ghost commented Jun 23, 2022 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@corona10
corona10 requested a review from vstinner June 24, 2022 15:53
@vstinner

Copy link
Copy Markdown
Member

This change lacks unit tests: I wrote PR #94234 which adds tests.

Thanks for the bug report and the PR!

@kumaraditya303

Copy link
Copy Markdown
Contributor

Fixed by #94234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants