-
-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-87347: Fix PyObject_NEW() regression #94234
Conversation
cc @corona10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Modules/_testcapimodule.c
Outdated
static PyObject * | ||
test_pymem_new(PyObject *self, PyObject *Py_UNUSED(ignored)) | ||
{ | ||
#define CHECK_PTR(ptr) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused macro?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Merged, thanks for reviews! |
Oops, my test leaks 4 references: I wrote PR #94330 to fix it. |
Don't add parenthesis around the type parameter.
Add unit tests on PyObject_NEW() and similar functions.