Disable Cython array bounds checking, assert array shapes in cacheSection

An assert is fine here - if any WorldEditor adapters don't validate the array shapes, you lose.
This commit is contained in:
David Vierra 2015-06-30 07:22:14 -10:00
parent 369d5dac71
commit 9103c363f8

View File

@ -1,5 +1,5 @@
# distutils: language = c++
# cython: profile = True
# cython: profile = True, boundscheck=False
"""
with_cython
"""
@ -79,6 +79,8 @@ cdef class RelightCtx(object):
if self.section_cache.size() > CACHE_LIMIT:
# xxx decache something!
pass
assert section.Blocks.shape == section.BlockLight.shape == section.SkyLight.shape == (16, 16, 16)
cachedSection.Blocks = section.Blocks
cachedSection.BlockLight = section.BlockLight
cachedSection.SkyLight = section.SkyLight