[Numpy-discussion] VS 2003 problems with cython-generated code

Charles R Harris charlesr.harris@gmail....
Fri Aug 15 12:18:15 CDT 2008


On Fri, Aug 15, 2008 at 10:49 AM, David Cournapeau <cournape@gmail.com>wrote:

> Hi,
>
> I noticed this morning that numpy 1.2 is not buildable with VS 2003
> (the one you have to use for official python releases for at least
> python 2.5, and maybe 2.4). When we generate C code, both with
> internal code (numpy/core/code_generator) and with external tools
> (cython/pyrex for mtrand), the string literals generated for
> docstrings are too long for visual studio. We have to break them (e.g.
> "foo bar" becomes "foo""bar"), but doing so with cython-generated code
> is only doable by changing cython itself.
>
> So I did patch cython to break those, and regenerate the mtrand.c.
> This is done in the vs_longstring branch. Is it ok to put this for 1.2
> ? Without it, I don't see a way to have numpy 1.2 buildable with VS.
>

Be careful if you break across lines. The gnu compilers will accept

"foo"
"bar"

But for some others you need to use a line continuation.

"foo"\
"bar"

Is this mostly for the ufuncs? I'm not sure why we can't make that operate
like add_newdocs.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080815/91004e1b/attachment.html 


More information about the Numpy-discussion mailing list