mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-28 17:51:07 +08:00
Merge recent bug fixes of development version into v0.8.x
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user