A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-February/108140.html below:

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

[Python-Dev] Const-correctness in C-API Object ProtocolDavid Claridge daave at daave.com
Tue Feb 22 00:34:45 CET 2011
Hi,

I was wondering if there is some reason why C API functions like
PyObject_CallMethod[1] and PySys_GetObject[2] take char* arguments
rather than const char*s? If there is some reason these methods will
modify their string arguments, it would be nice if it was documented,
because at the moment 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,

--
David Claridge
http://daave.com

[1] http://docs.python.org/c-api/object.html
[2] http://docs.python.org/c-api/sys.html
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4