New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replacing char* with const char* in sysmodule.c/.h #44837
Comments
I'm embedding Python in a C++ application and found myself casting const char* to char* quite often when using functions like PySys_SetObject and PySys_GetObject. I attached a patch replacing the char* arguments of the above mentioned functions, PySys_GetFile and PySys_AddWarnOption with const char*. |
The patch no longer applies to trunk, but that would be trivial to fix. Changes like these have been accepted with little resistance in the past A few comments:
|
At least a response, finally.
I guess it I just missed it.
That one is non-trivial and requires some rewriting of PySys_SetArgv. I attached an updated patch. |
The new patch looks fine to me. It applies and compiles without "[U]nless 'C' has adopted overloading while I wasn't looking ... it's http://mail.python.org/pipermail/cplusplus-sig/2005-December/009562.html On Thu, Nov 13, 2008 at 2:24 PM, Sebastian Ramacher
I agree and I only tossed this one in to check if you are aware of the In any case, +1 from me in favor of applying this patch and I will try |
Sorry, but it's too late to apply the patch. The issues don't count as I set the target version to 2.7 and 3.1. |
While technically this is an API change, in reality it is unlikely to In any case, I am not a big proponent of const correctness, but this Is it clear that this patch is not a candidate for minor releases - On Thu, Nov 13, 2008 at 4:29 PM, Christian Heimes
|
Concerning the SetArgv( int, char**), that one will have to be changed The reason is a bit complicated: if the function stored a Otherwise, I'm +1 on this kind of changes, because it makes immediately |
See also bpo-6952, which seems to be a broader request of the same |
Drop 2.7 as that's now gone. See also bpo-6952. |
2.7 is not gone. It has entered an extended maintenance period. During this period, 2.7.x releases will incorporate bug fixes but will not get any new features. This particular issue is arguably a bug. I think Christian should make a call on whether this is appropriate for 2.7. |
This is quite clearly marked as a feature request and hence is 3.2. If you wish to change it go ahead, but who's going to do the work? |
Any news on that? |
On Mon, Oct 18, 2010 at 11:17 AM, Sebastian Ramacher
Is this patch still relevant for 3.2? It looks like const has been |
In fact, it looks like const has been added in py3k as early as r57439. I am resetting "versions" to 2.7, but I am -0 on backporting. I am also unselecting "type" because with "feature request" type this should be closed while some may argue that this is a bug. |
Since the patches are not applicable to Py 3.x and Py 2.7 is stable I'm closing this bug. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: