On Fri, Feb 5, 2010 at 4:31 PM, Robert Bradshaw
<[email protected]> wrote:
> On Feb 5, 2010, at 7:54 AM, 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.
>>
>> 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))
>
> Thanks! http://hg.cython.org/cython-devel/rev/dc2a7157de42
>
> I agree testcases would be good to have to ensure this doesn't happen
> again.
>

Sorry, I should review the patch in the context of the whole code,
but... Is split_docstring() a proper name for the method, given that
IIUC it have to be used for any string literal and no just
docstrings... Sorry for being too pedantic ...



-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to