From: Christoph Gohlke Date: Fri, 5 Feb 2010 19:19:08 +0000 (-0800) Subject: Generate shorter string literals X-Git-Tag: 0.13.beta0~349^2~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fe22f9acc9442f0edd271bb9a6d92afc101cb1f2;p=cython.git Generate shorter string literals This is related to . Cython 0.12.1 still generates string literals that can be too long for MSVC* compilers. Please consider the following patch. --- diff --git a/Cython/Compiler/Code.py b/Cython/Compiler/Code.py index 5d198835..d84c4223 100644 --- a/Cython/Compiler/Code.py +++ b/Cython/Compiler/Code.py @@ -667,7 +667,7 @@ class GlobalState(object): 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))