Const-Correctness of Python/C

Lyle Johnson jlj at cfdrc.com
Thu May 11 09:31:41 EDT 2000


Some older C compilers wouldn't support the const keyword, so that could
be a problem.

Juergen Hermann wrote:
> 
> Hi!
> 
> Some calls in the Python/C API, namely
> 
>     PyObject* PyImport_ImportModule (char *name)
> 
> are (I assume) not const-correct. In the above example, I figure that the
> "name" argument is NOT changed, but that is not advertized. This either forces
> you to cast away constness from parameter you pass on in your own const-correct
> code, or create an unnecessary duplicate.
> 
> Could this be fixed within the 1.6 schedule? (I'd be happy to provide a list)
> 
> Ciao, Jürgen
> 
> --
> Jürgen Hermann (jhe at webde-ag.de)
> WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe
> Tel.: 0721/94329-0, Fax: 0721/94329-22



More information about the Python-list mailing list