On Wed, Feb 25, 2009 at 5:34 AM, Stefan Behnel <[email protected]> wrote:
>
> Lisandro Dalcin wrote:
>> After GCC-compiling mpi4py with flags '-std=c89 -pedantic
>> -Wno-long-long', I've got a bunch of warnings like this:
>>
>> warning: initializer element is not computable at load time
>>
>> After googling a bit to understand the issue, I wrote the attached
>> patch. Please review and apply if it is OK.
>
> Would it work to write this kind of code:
>
>    PyObject* values[N] = {0,0,...,0}; // all 0!
>    values[3] = non_NULL_default_value3;
>    values[8] = non_NULL_default_value8;
>

Yes, it would work ...

> instead of setting /all/ values separately? I would like to avoid
> unnecessary code here, but seeing the default values directly could even
> make things more readable.

I am +1 on your new way... If you agree,  I'll implement that and push ...


>
> Stefan
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>



-- 
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