[Python-checkins] cpython: Fix compilation error under Windows

antoine.pitrou python-checkins at python.org
Tue Oct 4 13:03:36 CEST 2011


http://hg.python.org/cpython/rev/dc21b26d80f9
changeset:   72651:dc21b26d80f9
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Tue Oct 04 13:00:02 2011 +0200
summary:
  Fix compilation error under Windows

files:
  Modules/faulthandler.c |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -610,7 +610,7 @@
     PyLockStatus st;
     PY_TIMEOUT_T timeout;
 
-    const int MAXDATA = 1024;
+#define MAXDATA 1024
     char buf1[MAXDATA], buf2[MAXDATA];
     char *data = buf1, *old_data = buf2;
     Py_ssize_t data_len, old_data_len = -1;
@@ -667,6 +667,7 @@
 
     /* The only way out */
     PyThread_release_lock(watchdog.running);
+#undef MAXDATA
 }
 
 static void

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list