Skip to content

gh-87347: Fix PyObject_NEW() regression - #94234

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:object_new
Jun 26, 2022
Merged

gh-87347: Fix PyObject_NEW() regression#94234
vstinner merged 1 commit into
python:mainfrom
vstinner:object_new

Conversation

@vstinner

@vstinnervstinner commented Jun 24, 2022

Copy link
Copy Markdown
Member

Don't add parenthesis around the type parameter.

Add unit tests on PyObject_NEW() and similar functions.

@vstinner

Copy link
Copy Markdown
MemberAuthor

cc @corona10

@corona10corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Comment threadModules/_testcapimodule.c Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused macro?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like leftovers from an early revision. I'm sure Victor will remove it before merging.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I forgot about it. That's why reviews are great :-) I removed this unused macro. I used if+goto instead of the macro.

Don't add parenthesis around the type parameter.
Add unit tests on PyObject_NEW() and similar functions.
@vstinner
vstinner merged commit 44c8e68 into python:mainJun 26, 2022
@vstinner
vstinner deleted the object_new branch June 26, 2022 10:40
@vstinner

Copy link
Copy Markdown
MemberAuthor

Merged, thanks for reviews!

@vstinner

Copy link
Copy Markdown
MemberAuthor

Oops, my test leaks 4 references: I wrote PR #94330 to fix it.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@vstinner@corona10@erlend-aasland@kumaraditya303@bedevere-bot