Issue #21: Avoid C++ keyword `module` by erlend-aasland · Pull Request #22 · python/pythoncapi-compat
Rename module variable/argument names as mod.
Fixes #21
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with easy solution but let's wait @vstinner 's review
Is it possible to detect the error using a C++ compiler warning to prevent adding new ones? The C++ compatibility is tested in tests/.
Is it possible to detect the error using a C++ compiler warning to prevent adding new ones? The C++ compatibility is tested in tests/.
Good point. I'll add a test.
I guess that this PR is related to: https://bugs.python.org/issue39355
I don't get any warning:
$ cat x.cc
int main() { int module = 1; return module; }
$ g++ -std=c++20 -Wall -Wextra x.cc -o x
# no warning
vstinner added a commit to vstinner/pythoncapi_compat that referenced this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters