[Python-Dev] Re: [Python-checkins] python/dist/src/Include co mpile.h,2.38,2.39 parsetok.h,2.19,2.20 pyerrors.h,2.63,2.64 pythonrun.h,2 .55,2.56 symtable.h,2.10,2.11

M.-A. Lemburg mal@lemburg.com
Wed, 11 Dec 2002 23:45:54 +0100


Martin v. L=F6wis wrote:
> "Delaney, Timothy" <tdelaney@avaya.com> writes:
>=20
>>I must admit I caused this recent constifying mess ... someone complain=
ed on
>>python-list and I told him to submit a bug report (in the hope that it =
would
>>get rejected because I knew the problems it would cause).
>=20
>=20
> I (obviously) did not feel that the request was misguided. The second
> on (on RunString) was probably more effort that it will ever do good,
> but I am convinced that the change is conceptually right, i.e. the
> strings used as file names and scripts really should be const, as
> people will pass string literals.
 >
> OTOH, there are more places left that should accept const strings, but
> don't, and I was certainly not out to fix them all. Instead, doing it
> on user request only seems right to me. In the long run, we get happy
> users because of such changes, which should be weighed against the few
> unhappy developers that now have to silence compiler warnings :-)

I would accept that point if you could demonstrate a single
case where the const nature of the filename actually does any
good for the *user*.

BTW, how can I silence warnings when writing C code that's
supposed to compiler with Python 2.1 and 2.3 ? (passing const char *
to a char * API doesn't work for obvious reasons)

--=20
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/