summaryrefslogtreecommitdiff
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
author?ukasz Langa <lukasz@langa.pl>2017-02-10 00:20:16 -0800
committer?ukasz Langa <lukasz@langa.pl>2017-02-10 00:20:16 -0800
commit8972587fab93cd27ac78b4eab3805f5e11164cb9 (patch)
tree3b6b18367a3054c41f3a186d60c321ef9a08ee38 /Objects/floatobject.c
parentc7a3f78cc193bfa7fc874f49ec2e0799b32da817 (diff)
parent2328d19475109a50de26fa42832a5286824b0391 (diff)
downloadcpython-8972587fab93cd27ac78b4eab3805f5e11164cb9.tar.gz
Merge 3.6 (fix #29519)
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 80bf71efd2..17a55dd114 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1225,7 +1225,7 @@ float_fromhex(PyObject *cls, PyObject *arg)
PyObject *result;
double x;
long exp, top_exp, lsb, key_digit;
- char *s, *coeff_start, *s_store, *coeff_end, *exp_start, *s_end;
+ const char *s, *coeff_start, *s_store, *coeff_end, *exp_start, *s_end;
int half_eps, digit, round_up, negate=0;
Py_ssize_t length, ndigits, fdigits, i;
@@ -1288,7 +1288,7 @@ float_fromhex(PyObject *cls, PyObject *arg)
s++;
/* infinities and nans */
- x = _Py_parse_inf_or_nan(s, &coeff_end);
+ x = _Py_parse_inf_or_nan(s, (char **)&coeff_end);
if (coeff_end != s) {
s = coeff_end;
goto finished;
@@ -1619,7 +1619,7 @@ static float_format_type detected_double_format, detected_float_format;
static PyObject *
float_getformat(PyTypeObject *v, PyObject* arg)
{
- char* s;
+ const char *s;
float_format_type r;
if (!PyUnicode_Check(arg)) {