From fe22f9acc9442f0edd271bb9a6d92afc101cb1f2 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Fri, 5 Feb 2010 11:19:08 -0800 Subject: [PATCH] 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. --- Cython/Compiler/Code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.26.2