Christoph Gohlke wrote:
> Dear Cython developers,
>
> This is related to <http://trac.cython.org/cython_trac/ticket/50>.
>
> Cython 0.12.1 still generates string literals that can be too long for MSVC*
> compilers. Please consider the following patch.
>
Thanks, excellent!
Do you have the possibility to also create a testcase so that this
doesn't happen again? Since none of the main developers use MSVC
regularily it is much harder for us to do so.
Just in case:
1) Create tests/compile/msvc_strings.pyx
2) Fill in the minimal things needed to get the failure with current Cython
3) python runtests.py msvc_strings
Then submit patch containing both the change and the test case.
Dag Sverre
> diff -r 8bff3332e34f Cython/Compiler/Code.py
> --- a/Cython/Compiler/Code.py Tue Feb 02 02:10:32 2010 -0800
> +++ b/Cython/Compiler/Code.py Thu Feb 04 19:32:40 2010 -0800
> @@ -667,7 +667,7 @@
> decls_writer = self.parts['decls']
> for _, cname, c in c_consts:
> decls_writer.putln('static char %s[] = "%s";' % (
> - cname, c.escaped_value))
> + cname, StringEncoding.split_docstring(c.escaped_value)))
> if c.py_strings is not None:
> for py_string in c.py_strings.itervalues():
> py_strings.append((c.cname, len(py_string.cname),
> py_string))
>
> Best,
>
> Christoph Gohlke
> Laboratory for Fluorescence Dynamics
> University of California, Irvine
> http://www.lfd.uci.edu/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev