Skip to content

Commit 9949091

Browse files
pythongh-127341: Argument Clinic: fix compiler warnings for getters with docstrings (python#127310)
Co-authored-by: Erlend E. Aasland <[email protected]>
1 parent 762c603 commit 9949091

File tree

6 files changed

+68
-178
lines changed

6 files changed

+68
-178
lines changed

Lib/test/clinic.test.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5303,9 +5303,7 @@ Test_meth_coexist_impl(TestObj *self)
53035303
Test.property
53045304
[clinic start generated code]*/
53055305

5306-
#if defined(Test_property_HAS_DOCSTR)
5307-
# define Test_property_DOCSTR Test_property__doc__
5308-
#else
5306+
#if !defined(Test_property_DOCSTR)
53095307
# define Test_property_DOCSTR NULL
53105308
#endif
53115309
#if defined(TEST_PROPERTY_GETSETDEF)
@@ -5326,16 +5324,14 @@ Test_property_get(TestObj *self, void *Py_UNUSED(context))
53265324

53275325
static PyObject *
53285326
Test_property_get_impl(TestObj *self)
5329-
/*[clinic end generated code: output=27b519719d992e03 input=2d92b3449fbc7d2b]*/
5327+
/*[clinic end generated code: output=7cadd0f539805266 input=2d92b3449fbc7d2b]*/
53305328

53315329
/*[clinic input]
53325330
@setter
53335331
Test.property
53345332
[clinic start generated code]*/
53355333

5336-
#if defined(TEST_PROPERTY_HAS_DOCSTR)
5337-
# define Test_property_DOCSTR Test_property__doc__
5338-
#else
5334+
#if !defined(Test_property_DOCSTR)
53395335
# define Test_property_DOCSTR NULL
53405336
#endif
53415337
#if defined(TEST_PROPERTY_GETSETDEF)
@@ -5360,7 +5356,7 @@ Test_property_set(TestObj *self, PyObject *value, void *Py_UNUSED(context))
53605356

53615357
static int
53625358
Test_property_set_impl(TestObj *self, PyObject *value)
5363-
/*[clinic end generated code: output=d51023f17c4ac3a1 input=3bc3f46a23c83a88]*/
5359+
/*[clinic end generated code: output=e4342fe9bb1d7817 input=3bc3f46a23c83a88]*/
53645360

53655361
/*[clinic input]
53665362
output push

Modules/_io/clinic/bufferedio.c.h

Lines changed: 4 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/_io/clinic/stringio.c.h

Lines changed: 4 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/_io/clinic/textio.c.h

Lines changed: 13 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)