Skip to content

Commit 47f02e5

Browse files
committed
ncurses' winch and mvwinch return an unsigned long
2 parents 724b828 + abbc8ca commit 47f02e5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Modules/_cursesmodule.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,8 @@ PyCursesWindow_InsCh(PyCursesWindowObject *self, PyObject *args)
14141414
static PyObject *
14151415
PyCursesWindow_InCh(PyCursesWindowObject *self, PyObject *args)
14161416
{
1417-
int x, y, rtn;
1417+
int x, y;
1418+
unsigned long rtn;
14181419

14191420
switch (PyTuple_Size(args)) {
14201421
case 0:
@@ -1429,7 +1430,7 @@ PyCursesWindow_InCh(PyCursesWindowObject *self, PyObject *args)
14291430
PyErr_SetString(PyExc_TypeError, "inch requires 0 or 2 arguments");
14301431
return NULL;
14311432
}
1432-
return PyLong_FromLong((long) rtn);
1433+
return PyLong_FromUnsignedLong(rtn);
14331434
}
14341435

14351436
static PyObject *

0 commit comments

Comments
 (0)