[Python-Dev] Opinions on const-correctness?

David Abrahams David Abrahams" <david.abrahams@rcn.com
Tue, 12 Mar 2002 15:27:14 -0500


That would sure be "way nice" for me and my users...

-Dave

----- Original Message -----
From: "Juergen Hermann" <j.her@t-online.de>
To: "Python Developers List" <python-dev@python.org>
Sent: Tuesday, March 12, 2002 3:10 PM
Subject: [Python-Dev] Opinions on const-correctness?


Hi!

When you interface const-correct C or C++ code with Python, you
currently need to jump through hoops like this:

somefunc(const char* modulename, const char* key)
{
    ... PyImport_ImportModule(const_cast<char*>(modulename)) ...


I'd be willing to invest some time to change this, the question is:

 1. someone opposed to such a change?

 2. any technical reasons against it (const is ANSI, do we have a
portability problem that cannot be solved by a #define)?

The largest negative effect I can see is that it'll add some turbulence
to the CVS log (many little changes).

Ciao, Jürgen



_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev