Commit 37b62881 authored by Mark Dickinson's avatar Mark Dickinson

Issue #8677: Make curses module PY_SSIZE_T_CLEAN.

parent 782efc83
...@@ -100,6 +100,8 @@ char *PyCursesVersion = "2.2"; ...@@ -100,6 +100,8 @@ char *PyCursesVersion = "2.2";
/* Includes */ /* Includes */
#define PY_SSIZE_T_CLEAN
#include "Python.h" #include "Python.h"
...@@ -1382,7 +1384,7 @@ PyCursesWindow_PutWin(PyCursesWindowObject *self, PyObject *stream) ...@@ -1382,7 +1384,7 @@ PyCursesWindow_PutWin(PyCursesWindowObject *self, PyObject *stream)
fseek(fp, 0, 0); fseek(fp, 0, 0);
while (1) { while (1) {
char buf[BUFSIZ]; char buf[BUFSIZ];
int n = fread(buf, 1, BUFSIZ, fp); Py_ssize_t n = fread(buf, 1, BUFSIZ, fp);
if (n <= 0) if (n <= 0)
break; break;
Py_DECREF(res); Py_DECREF(res);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment