David Martin wrote: > I am getting quite a few errors when running the Cython tests through > runtests.py. This is on a machine with VS .NET 2003 installed, using the > command 'python runtests.py --no-refnanny". I get the same set of errors > when I run the tests using the mingw compiler. > [...] > callargs.c > callargs.c(398) : error C2026: string too big, trailing characters truncated > callargs.cpp > callargs.cpp(398) : error C2026: string too big, trailing characters > truncated > [...]
This is a known limitation of older MS compilers which fail to compile strings of 2048 bytes or longer (really bytes, not GB or something, just a tiny 2048 bytes). Usually not too hard to work around for 'normal' string literals which can be concatenated, but certainly a big problem for doc strings (which is the case here, Cython's test suite consists of doctests). I looked into this a while ago, but it would require changing the way docstrings are set up. Currently, we just write the string literals into a func/type/etc. struct member somewhere. To fix this, we'd need to build the literal dynamically during module initialisation, fix the static struct member to point to it (or rather allocate the struct on the heap and do it there), and free() the string during module cleanup. Seemed like too much hassle at the time, especially since the problem has now gone away with Python 2.6, which requires a newer MS compiler IIRC. MinGW (obviously) does not suffer from this problem either. Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
