@charris you were right. It also work for multi-dimensional arrays when (newtype == NULL && flags == 0).