Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit abbc8ca

Browse files
committed
ncurses' winch and mvwinch return an unsigned long
1 parent 13e6d23 commit abbc8ca

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
@@ -1342,7 +1342,8 @@ PyCursesWindow_InsCh(PyCursesWindowObject *self, PyObject *args)
13421342
static PyObject *
13431343
PyCursesWindow_InCh(PyCursesWindowObject *self, PyObject *args)
13441344
{
1345-
int x, y, rtn;
1345+
int x, y;
1346+
unsigned long rtn;
13461347

13471348
switch (PyTuple_Size(args)) {
13481349
case 0:
@@ -1357,7 +1358,7 @@ PyCursesWindow_InCh(PyCursesWindowObject *self, PyObject *args)
13571358
PyErr_SetString(PyExc_TypeError, "inch requires 0 or 2 arguments");
13581359
return NULL;
13591360
}
1360-
return PyLong_FromLong((long) rtn);
1361+
return PyLong_FromUnsignedLong(rtn);
13611362
}
13621363

13631364
static PyObject *

0 commit comments

Comments
 (0)