summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-04-05 13:50:24 (GMT)
committerGitHub <noreply@github.com>2021-04-05 13:50:24 (GMT)
commitb1dc1aacf8b0f319024a1a3ce91d395956537c11 (patch)
treed37c2b41f5fd1af45f9e27d66114c7f6b133fe21 /Modules/clinic
parentc8e5eb904e12010d2302364e1037c24a30f5e241 (diff)
downloadcpython-b1dc1aacf8b0f319024a1a3ce91d395956537c11.zip
cpython-b1dc1aacf8b0f319024a1a3ce91d395956537c11.tar.gz
cpython-b1dc1aacf8b0f319024a1a3ce91d395956537c11.tar.bz2
bpo-43084: Return bool instead of int from curses.window.enclose() (GH-24398)
Diffstat (limited to 'Modules/clinic')
-rw-r--r--Modules/clinic/_cursesmodule.c.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h
index e46a8e3..9c96116 100644
--- a/Modules/clinic/_cursesmodule.c.h
+++ b/Modules/clinic/_cursesmodule.c.h
@@ -689,7 +689,7 @@ PyDoc_STRVAR(_curses_window_enclose__doc__,
#define _CURSES_WINDOW_ENCLOSE_METHODDEF \
{"enclose", (PyCFunction)(void(*)(void))_curses_window_enclose, METH_FASTCALL, _curses_window_enclose__doc__},
-static long
+static PyObject *
_curses_window_enclose_impl(PyCursesWindowObject *self, int y, int x);
static PyObject *
@@ -698,7 +698,6 @@ _curses_window_enclose(PyCursesWindowObject *self, PyObject *const *args, Py_ssi
PyObject *return_value = NULL;
int y;
int x;
- long _return_value;
if (!_PyArg_CheckPositional("enclose", nargs, 2, 2)) {
goto exit;
@@ -711,11 +710,7 @@ _curses_window_enclose(PyCursesWindowObject *self, PyObject *const *args, Py_ssi
if (x == -1 && PyErr_Occurred()) {
goto exit;
}
- _return_value = _curses_window_enclose_impl(self, y, x);
- if ((_return_value == -1) && PyErr_Occurred()) {
- goto exit;
- }
- return_value = PyLong_FromLong(_return_value);
+ return_value = _curses_window_enclose_impl(self, y, x);
exit:
return return_value;
@@ -4289,4 +4284,4 @@ _curses_has_extended_color_support(PyObject *module, PyObject *Py_UNUSED(ignored
#ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF
#define _CURSES_USE_DEFAULT_COLORS_METHODDEF
#endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */
-/*[clinic end generated code: output=ae6559aa61200289 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=9efc9943a3ac3741 input=a9049054013a1b77]*/