summaryrefslogtreecommitdiffstats
path: root/Objects/longobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-10-19 18:03:34 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-10-19 18:03:34 (GMT)
commitc679227e31245b0e8dec74a1f7cc77710541d985 (patch)
tree0ed52ac2bd85d0cad42e39aec5437a603750425b /Objects/longobject.c
parent80ab13067e9b8fbd02a05a4863e26b04938b77f5 (diff)
downloadcpython-c679227e31245b0e8dec74a1f7cc77710541d985.zip
cpython-c679227e31245b0e8dec74a1f7cc77710541d985.tar.gz
cpython-c679227e31245b0e8dec74a1f7cc77710541d985.tar.bz2
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 876cd19..a5c0d1b 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -1941,10 +1941,10 @@ unsigned char _PyLong_DigitValue[256] = {
* string characters.
*/
static PyLongObject *
-long_from_binary_base(char **str, int base)
+long_from_binary_base(const char **str, int base)
{
- char *p = *str;
- char *start = p;
+ const char *p = *str;
+ const char *start = p;
int bits_per_char;
Py_ssize_t n;
PyLongObject *z;
@@ -2009,10 +2009,10 @@ long_from_binary_base(char **str, int base)
* If unsuccessful, NULL will be returned.
*/
PyObject *
-PyLong_FromString(char *str, char **pend, int base)
+PyLong_FromString(const char *str, char **pend, int base)
{
int sign = 1, error_if_nonzero = 0;
- char *start, *orig_str = str;
+ const char *start, *orig_str = str;
PyLongObject *z = NULL;
PyObject *strobj;
Py_ssize_t slen;
@@ -2147,7 +2147,7 @@ digit beyond the first.
int convwidth;
twodigits convmultmax, convmult;
digit *pz, *pzstop;
- char* scan;
+ const char* scan;
static double log_base_BASE[37] = {0.0e0,};
static int convwidth_base[37] = {0,};
@@ -2275,12 +2275,12 @@ digit beyond the first.
if (z == NULL)
return NULL;
if (pend != NULL)
- *pend = str;
+ *pend = (char *)str;
return (PyObject *) z;
onError:
if (pend != NULL)
- *pend = str;
+ *pend = (char *)str;
Py_XDECREF(z);
slen = strlen(orig_str) < 200 ? strlen(orig_str) : 200;
strobj = PyUnicode_FromStringAndSize(orig_str, slen);