[Python-checkins] cpython: Fixed compile error on Windows caused by arithmetic with void * pointers

serhiy.storchaka python-checkins at python.org
Mon Nov 11 06:52:12 CET 2013


http://hg.python.org/cpython/rev/35cd00465624
changeset:   87049:35cd00465624
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Mon Nov 11 07:47:35 2013 +0200
summary:
  Fixed compile error on Windows caused by arithmetic with void * pointers
(issue #16685).

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


diff --git a/Modules/audioop.c b/Modules/audioop.c
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -287,9 +287,9 @@
     15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
 };
 
-#define GETINTX(T, cp, i)  (*(T *)((cp) + (i)))
-#define SETINTX(T, cp, i, val)  do {    \
-        *(T *)((cp) + (i)) = (T)(val);  \
+#define GETINTX(T, cp, i)  (*(T *)((unsigned char *)(cp) + (i)))
+#define SETINTX(T, cp, i, val)  do {                    \
+        *(T *)((unsigned char *)(cp) + (i)) = (T)(val); \
     } while (0)
 
 

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


More information about the Python-checkins mailing list