summaryrefslogtreecommitdiff
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2017-02-04 09:19:04 +0300
committerBerker Peksag <berker.peksag@gmail.com>2017-02-04 09:19:04 +0300
commitb53991455f7f258ede7a26b69c2be5b8138b9f8a (patch)
tree3615cf0ef453ab113a547b1dfebacf415ed32602 /Objects/floatobject.c
parent678487eb345f9f9dea3d3818ecad7d39145bdc65 (diff)
parent9bfb9694a65124a8191cdb8ce7992445d1d0f4d2 (diff)
downloadcpython-b53991455f7f258ede7a26b69c2be5b8138b9f8a.tar.gz
Issue #29198: Merge from 3.6
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)) {