[New-bugs-announce] [issue1866] const arg for PyInt_FromString
phil
report at bugs.python.org
Fri Jan 18 19:46:10 CET 2008
New submission from phil:
In PyInt_FromString(), please change the type of the first
arg from char * to const char *. That is, of course, if
the function indeed does not write to the string. (I took
a quick look at the code; it doesn't appear to.)
If the function does modify the string, it should be
documented.
I'm getting a compiler error in some C++ code when I
use a std::string::c_str() as the arg. Of course, I could
cast away the const, but paranoid as I am, I'd like
reassurance that I can do so with impunity. :-)
----------
components: Extension Modules
messages: 60108
nosy: philipdumont
severity: minor
status: open
title: const arg for PyInt_FromString
type: rfe
versions: Python 2.5
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1866>
__________________________________
More information about the New-bugs-announce
mailing list