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

Skip to content

Commit e047cfa

Browse files
committed
Issue #8677: Make curses module PY_SSIZE_T_CLEAN.
1 parent a467d38 commit e047cfa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Modules/_cursesmodule.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ char *PyCursesVersion = "2.2";
100100

101101
/* Includes */
102102

103+
#define PY_SSIZE_T_CLEAN
104+
103105
#include "Python.h"
104106

105107

@@ -1382,7 +1384,7 @@ PyCursesWindow_PutWin(PyCursesWindowObject *self, PyObject *stream)
13821384
fseek(fp, 0, 0);
13831385
while (1) {
13841386
char buf[BUFSIZ];
1385-
int n = fread(buf, 1, BUFSIZ, fp);
1387+
Py_ssize_t n = fread(buf, 1, BUFSIZ, fp);
13861388
if (n <= 0)
13871389
break;
13881390
Py_DECREF(res);

0 commit comments

Comments
 (0)