Re: [Python-Dev] Const-correctness in C-API Object Protocol

2011-02-22 Thread David Claridge
ssues. Even if it is eventually decided not to backport those patches to 2.7, it would be nice if the documentation could be updated to indicate that strings passed to those functions won't be modified, so that API users like myself can feel a little safer when passing literals

[Python-Dev] Const-correctness in C-API Object Protocol

2011-02-21 Thread David Claridge
it's unclear whether it is safe to cast a string literal to char* in these cases. For instance it seems reasonable that I should be able to call PySys_GetObject("path") without having to deal with a 'deprecated conversion from string constant to ‘char*’' error. Thanks