Re: [Python-Dev] Add const to python API - issue 6952

2009-10-31 Thread Barry Scott
On 22 Oct 2009, at 20:31, Barry Scott wrote: On 21 Oct 2009, at 06:15, Martin v. Löwis wrote: I suggest following POSIX's lead and omitted the const in these cases. Ah... Yes I see this in strstr for example. Thanks, that sounds reasonable. This is basically what I have done in the

Re: [Python-Dev] Add const to python API - issue 6952

2009-10-22 Thread Barry Scott
On 21 Oct 2009, at 06:15, Martin v. Löwis wrote: I suggest following POSIX's lead and omitted the const in these cases. Ah... Yes I see this in strstr for example. Thanks, that sounds reasonable. This is basically what I have done in the patch I hope. I have updated the patch to

Re: [Python-Dev] Add const to python API - issue 6952

2009-10-20 Thread Barry Scott
On 20 Oct 2009, at 04:35, Martin v. Löwis wrote: 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. What specific APIs are you talking about here? Checking my patch I have two functions that need to

Re: [Python-Dev] Add const to python API - issue 6952

2009-10-20 Thread Daniel Stutzbach
On Tue, Oct 20, 2009 at 4:03 PM, Barry Scott ba...@barrys-emacs.org wrote: Checking my patch I have two functions that need to have output params changed to const to avoid casting. PyOS_strtoul- ptr PyLong_FromString - pend This is a no-win

Re: [Python-Dev] Add const to python API - issue 6952

2009-10-20 Thread Martin v. Löwis
I suggest following POSIX's lead and omitted the const in these cases. Thanks, that sounds reasonable. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

[Python-Dev] Add const to python API - issue 6952

2009-10-19 Thread Barry Scott
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

Re: [Python-Dev] Add const to python API - issue 6952

2009-10-19 Thread Martin v. Löwis
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. What specific APIs are you talking about here? Regards, Martin ___ Python-Dev mailing list