Re: [Python-Dev] constness of interpreter data

2008-09-07 Thread Martin v. Löwis
> So, er, is this a remotely sane thing to be doing, and does anyone have > suggestions? :) Not for 2.6/3.0 - but after that: sounds good. OTOH, I don't see a clear technical *need* for these data to be const. In general, const-ness helps correctness and sharing across processes, and the cases yo

Re: [Python-Dev] constness of interpreter data

2008-09-01 Thread Aahz
On Mon, Sep 01, 2008, Torne Wuff wrote: > > Attached is a patch which adds const to the easy ones: > * Docstrings for extension functions (PyDoc_VAR in Python.h) > * ascii->digit lookup table (_PyLong_DigitValue in longobject.c) > * The copyright notice (cprt in getcopyright.c) If you want

[Python-Dev] constness of interpreter data

2008-09-01 Thread Torne Wuff
libpython2.5.a contains quite a lot of .data that doesn't look like it needs to be writable (my minimal interpreter binary has 105KB of writable allocated data). A lot of these symbols look like they could just be tagged const with no other changes to the interpreter; some of them would require a p