API : constness ?

Isaac To kkto at csis.hku.hk
Tue Jun 1 23:35:09 EDT 2004


>>>>> "Benoît" == Benoît Dejean <bnet at ifrance.com> writes:

    Benoît> and i was talking of a const char * kwlist[] { } obvious
    Benoît> optimization is to declare kwlist as static. but when the module
    Benoît> is loade, kwlist gets initialize. adding another const tags the
    Benoît> whole kwlist as const and then totally readonly. therefor, your
    Benoît> compiler is able to store kwlist (the array) in a RO segment.

The compiler is never capable to store kwlist in a RO segment if it is
compiling to a module.  See my 2 previous posts.

Regards,
Isaac.



More information about the Python-list mailing list