Commit fe22f9ac authored by Christoph Gohlke's avatar Christoph Gohlke

Generate shorter string literals

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.
parent 3e15e7a4
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment