summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorPeter Bierma <zintensitydev@gmail.com>2024-12-19 14:00:30 (GMT)
committerGitHub <noreply@github.com>2024-12-19 14:00:30 (GMT)
commitb5d1e4552f0ba40d8380368e1b099261686a89cf (patch)
tree3a0d0533fcd1ac424eb1d41cab6ffc3503bb6ca5 /Lib/test
parentea578fc6d310c85538aefbb900a326c5c3424dd5 (diff)
downloadcpython-b5d1e4552f0ba40d8380368e1b099261686a89cf.zip
cpython-b5d1e4552f0ba40d8380368e1b099261686a89cf.tar.gz
cpython-b5d1e4552f0ba40d8380368e1b099261686a89cf.tar.bz2
gh-128083: Fix macro redefinition warning in clinic. (GH-127950)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/clinic.test.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/Lib/test/clinic.test.c b/Lib/test/clinic.test.c
index b6ae04e..e4f146c 100644
--- a/Lib/test/clinic.test.c
+++ b/Lib/test/clinic.test.c
@@ -5359,6 +5359,75 @@ Test_property_set_impl(TestObj *self, PyObject *value)
/*[clinic end generated code: output=e4342fe9bb1d7817 input=3bc3f46a23c83a88]*/
/*[clinic input]
+@setter
+Test.setter_first_with_docstr
+[clinic start generated code]*/
+
+#if !defined(Test_setter_first_with_docstr_DOCSTR)
+# define Test_setter_first_with_docstr_DOCSTR NULL
+#endif
+#if defined(TEST_SETTER_FIRST_WITH_DOCSTR_GETSETDEF)
+# undef TEST_SETTER_FIRST_WITH_DOCSTR_GETSETDEF
+# define TEST_SETTER_FIRST_WITH_DOCSTR_GETSETDEF {"setter_first_with_docstr", (getter)Test_setter_first_with_docstr_get, (setter)Test_setter_first_with_docstr_set, Test_setter_first_with_docstr_DOCSTR},
+#else
+# define TEST_SETTER_FIRST_WITH_DOCSTR_GETSETDEF {"setter_first_with_docstr", NULL, (setter)Test_setter_first_with_docstr_set, NULL},
+#endif
+
+static int
+Test_setter_first_with_docstr_set_impl(TestObj *self, PyObject *value);
+
+static int
+Test_setter_first_with_docstr_set(TestObj *self, PyObject *value, void *Py_UNUSED(context))
+{
+ int return_value;
+
+ return_value = Test_setter_first_with_docstr_set_impl(self, value);
+
+ return return_value;
+}
+
+static int
+Test_setter_first_with_docstr_set_impl(TestObj *self, PyObject *value)
+/*[clinic end generated code: output=e4d76b558a4061db input=31a045ce11bbe961]*/
+
+/*[clinic input]
+@getter
+Test.setter_first_with_docstr
+
+my silly docstring
+[clinic start generated code]*/
+
+PyDoc_STRVAR(Test_setter_first_with_docstr__doc__,
+"my silly docstring");
+#if defined(Test_setter_first_with_docstr_DOCSTR)
+# undef Test_setter_first_with_docstr_DOCSTR
+#endif
+#define Test_setter_first_with_docstr_DOCSTR Test_setter_first_with_docstr__doc__
+
+#if !defined(Test_setter_first_with_docstr_DOCSTR)
+# define Test_setter_first_with_docstr_DOCSTR NULL
+#endif
+#if defined(TEST_SETTER_FIRST_WITH_DOCSTR_GETSETDEF)
+# undef TEST_SETTER_FIRST_WITH_DOCSTR_GETSETDEF
+# define TEST_SETTER_FIRST_WITH_DOCSTR_GETSETDEF {"setter_first_with_docstr", (getter)Test_setter_first_with_docstr_get, (setter)Test_setter_first_with_docstr_set, Test_setter_first_with_docstr_DOCSTR},
+#else
+# define TEST_SETTER_FIRST_WITH_DOCSTR_GETSETDEF {"setter_first_with_docstr", (getter)Test_setter_first_with_docstr_get, NULL, Test_setter_first_with_docstr_DOCSTR},
+#endif
+
+static PyObject *
+Test_setter_first_with_docstr_get_impl(TestObj *self);
+
+static PyObject *
+Test_setter_first_with_docstr_get(TestObj *self, void *Py_UNUSED(context))
+{
+ return Test_setter_first_with_docstr_get_impl(self);
+}
+
+static PyObject *
+Test_setter_first_with_docstr_get_impl(TestObj *self)
+/*[clinic end generated code: output=749a30266f9fb443 input=10af4e43b3cb34dc]*/
+
+/*[clinic input]
output push
output preset buffer
[clinic start generated code]*/