Skip to content

Commit

Permalink
gh-127341: Argument Clinic: fix compiler warnings for getters with do…
Browse files Browse the repository at this point in the history
…cstrings (#127310)

Co-authored-by: Erlend E. Aasland <[email protected]>
  • Loading branch information
ZeroIntensity and erlend-aasland authored Nov 29, 2024
1 parent 762c603 commit 9949091
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 178 deletions.
12 changes: 4 additions & 8 deletions Lib/test/clinic.test.c
Original file line number Diff line number Diff line change
Expand Up @@ -5303,9 +5303,7 @@ Test_meth_coexist_impl(TestObj *self)
Test.property
[clinic start generated code]*/

#if defined(Test_property_HAS_DOCSTR)
# define Test_property_DOCSTR Test_property__doc__
#else
#if !defined(Test_property_DOCSTR)
# define Test_property_DOCSTR NULL
#endif
#if defined(TEST_PROPERTY_GETSETDEF)
Expand All @@ -5326,16 +5324,14 @@ Test_property_get(TestObj *self, void *Py_UNUSED(context))

static PyObject *
Test_property_get_impl(TestObj *self)
/*[clinic end generated code: output=27b519719d992e03 input=2d92b3449fbc7d2b]*/
/*[clinic end generated code: output=7cadd0f539805266 input=2d92b3449fbc7d2b]*/

/*[clinic input]
@setter
Test.property
[clinic start generated code]*/

#if defined(TEST_PROPERTY_HAS_DOCSTR)
# define Test_property_DOCSTR Test_property__doc__
#else
#if !defined(Test_property_DOCSTR)
# define Test_property_DOCSTR NULL
#endif
#if defined(TEST_PROPERTY_GETSETDEF)
Expand All @@ -5360,7 +5356,7 @@ Test_property_set(TestObj *self, PyObject *value, void *Py_UNUSED(context))

static int
Test_property_set_impl(TestObj *self, PyObject *value)
/*[clinic end generated code: output=d51023f17c4ac3a1 input=3bc3f46a23c83a88]*/
/*[clinic end generated code: output=e4342fe9bb1d7817 input=3bc3f46a23c83a88]*/

/*[clinic input]
output push
Expand Down
14 changes: 4 additions & 10 deletions Modules/_io/clinic/bufferedio.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions Modules/_io/clinic/stringio.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 13 additions & 31 deletions Modules/_io/clinic/textio.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9949091

Please sign in to comment.