[Cython] broken array declarators when size is an expression
Lisandro Dalcin
dalcinl at gmail.com
Fri Nov 14 23:52:49 CET 2008
This changeset
changeset: 1333:34aca76e1b9d
parent: 1326:cf41fa30ad5f
user: Stefan Behnel <scoder at users.berlios.de>
date: Fri Nov 14 19:19:55 2008 +0100
summary: array size must be set as int, not numeric string
broke mpi4py and petsc4py, where I use stack-allocated arrays where
the size comes from an (external) enumeration, for example:
cdef char name[MPI_MAX_OBJECT_NAME+1]
I had to remove an 'assert' in Cython/Compiler/PyrexTypes.py at
__init__ of class CArrayType.
Additionally, I've added a few tests for all this. I really do not
know how to make the assert smarter by analyzing expressions.
Stefan, please review.
--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
More information about the Cython-dev
mailing list