-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-31926: fix missing *_METHODDEF statements by argument clinic #4230
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
bpo-31926: fix missing *_METHODDEF statements by argument clinic #4230
Conversation
When a single .c file contains several functions and/or methods with the same name, a safety _METHODDEF #define statement is generated only for one of them. This fixes the bug by using the full name of the function to avoid duplicates rather than just the name.
You have to run "make clinic": PR must included generated files. Running "make clinic" changes Modules/clinic/zlibmodule.c.h to add:
So I think that you can remove the #ifdef in zlibmodule.c:
|
I think it is worth to add a news entry into the "Build" section. |
Oh, and you can do the same change for ZLIB_COMPRESS_COPY_METHODDEF. |
I've done all that @serhiy-storchaka and @Haypo suggested. Please review the Note: This will require manual backporting. |
* add news entry * run "make clinic" * remove two #ifdef checks in zlibmodule.c which are no longer needed
fdc585a
to
35a96e1
Compare
@@ -0,0 +1,4 @@ | |||
rgument Clinic failing to generate some ``#ifndef ... #define`` blocks for |
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.
✂️
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.
Done.
Can this go in?
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.
Sorry for been too terse and ambiguous. I meant that the NEWS entry were cut (missed starting "A" and likely "Fixed"), not that it should be shortened. But in any case the new wording looks better to me!
Thanks @taleinat for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6. |
Sorry, @taleinat and @serhiy-storchaka, I could not cleanly backport this to |
Should I make the 3.6 backport? |
Yes, please do this. We will not convert new files to Argument Clinic in 3.6, and the existing files contain workarounds, but it is better to fix the bug. |
pythonGH-4230) When a single .c file contains several functions and/or methods with the same name, a safety _METHODDEF GH-define statement is generated only for one of them. This fixes the bug by using the full name of the function to avoid duplicates rather than just the name.. (cherry picked from commit 4f57409)
GH-4253 is a backport of this pull request to the 3.6 branch. |
GH-4230) (#4253) When a single .c file contains several functions and/or methods with the same name, a safety _METHODDEF GH-define statement is generated only for one of them. This fixes the bug by using the full name of the function to avoid duplicates rather than just the name.. (cherry picked from commit 4f57409)
…hon#4230) When a single .c file contains several functions and/or methods with the same name, a safety _METHODDEF #define statement is generated only for one of them. This fixes the bug by using the full name of the function to avoid duplicates rather than just the name.
When a single .c file contains several functions and/or methods with the same name, a safety
_METHODDEF
#define
block is generated only for one of them.This fixes the bug by using the full name of the function to avoid duplicates rather than just the name.
https://bugs.python.org/issue31926