[Python-checkins] r81085 - python/branches/py3k/Modules/_cursesmodule.c

mark.dickinson python-checkins at python.org
Tue May 11 19:57:09 CEST 2010


Author: mark.dickinson
Date: Tue May 11 19:57:09 2010
New Revision: 81085

Log:
Issue #8677:  Make curses module PY_SSIZE_T_CLEAN.

Modified:
   python/branches/py3k/Modules/_cursesmodule.c

Modified: python/branches/py3k/Modules/_cursesmodule.c
==============================================================================
--- python/branches/py3k/Modules/_cursesmodule.c	(original)
+++ python/branches/py3k/Modules/_cursesmodule.c	Tue May 11 19:57:09 2010
@@ -100,6 +100,8 @@
 
 /* Includes */
 
+#define PY_SSIZE_T_CLEAN
+
 #include "Python.h"
 
 
@@ -1382,7 +1384,7 @@
   fseek(fp, 0, 0);
   while (1) {
     char buf[BUFSIZ];
-    int n = fread(buf, 1, BUFSIZ, fp);
+    Py_ssize_t n = fread(buf, 1, BUFSIZ, fp);
     if (n <= 0)
       break;
     Py_DECREF(res);


More information about the Python-checkins mailing list