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/2009-October/093087.html below:

[Python-Dev] Add const to python API

[Python-Dev] Add const to python API - issue 6952 [Python-Dev] Add const to python API - issue 6952Barry Scott barry at barrys-emacs.org
Mon Oct 19 22:39:06 CEST 2009
http://bugs.python.org/issue6952

Martin v. Löwis suggested that solutions to this issue should be  
discussed here.

My goal is to avoid compiler warning and the need to cast to remove  
const when
calling the python API.

For example I see compiler messages like this on Mac OS X Snow Leopard  
g++ reports:

example.cxx:633: warning: deprecated conversion from string constant  
to ‘char*’

The patch I developed for comment only adds const to the input  
parameters and used casts to
allow output parameters to stay without the const.

This is because adding the const to the input params will not break  
existing code, but
adding const to output parameters may well require code changes for  
users of the Python
API.

What is the best approach to this problem that will be acceptable?

Barry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20091019/d7f6ae05/attachment.htm>
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