Fix MSVC error C2036: 'void *' : unknown size

This commit is contained in:
Christoph Gohlke
2013-03-06 10:09:59 -08:00
parent 387c72b018
commit 45f53c9e3a
+2 -2
View File
@@ -191,7 +191,7 @@ cdef Histograms *allocate_histograms(Py_ssize_t rows,
memset(ptr, 0, memory_size)
# align ph.accumulator to 32-byte boundary
roundoff = (<Py_ssize_t> ptr + 31) % 32
ph = <Histograms *> (ptr + 31 - roundoff)
ph = <Histograms *> (<Py_ssize_t> ptr + 31 - roundoff)
if not ptr:
return ph
ph.memory = ptr
@@ -202,7 +202,7 @@ cdef Histograms *allocate_histograms(Py_ssize_t rows,
# Align histogram memory to a 32-byte boundary
#
roundoff = (<Py_ssize_t> ptr + 31) % 32
ptr += 31 - roundoff
ptr = <void *> (<Py_ssize_t> ptr + 31 - roundoff)
ph.histogram = <Histogram *> ptr
#
# Fill in the statistical things we keep around