Clinic causes compiler warnings when a setter is defined before a getter with a docstring #128083
Labels
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
topic-argument-clinic
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
Found while working on #127946
This is sort of an extension to #127341, but not the exact same issue. If you define a setter before a getter, and then that getter has a docstring, a macro redefinition warning will occur, because the setter code sets the docstring to
NULL
.Quick repro:
The simplest fix is to just
#undef
theDOCSTR
macro in the getter if it's been defined already. I have a PR at #127950.CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: