From 8a6b38c9bea96c20637e83e23c0d45808dd464d9 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 12 Mar 2015 18:58:59 +0100 Subject: [PATCH] Remove a const from a variable that should be mutable. deadline is passed by address to PyArg_ParseTuple to update its value. However, deadline is a const double, so attempting to change its value is undefined behavior. Remove the const to have well-defined behavior. --- src/python/src/grpc/_adapter/_call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/src/grpc/_adapter/_call.c b/src/python/src/grpc/_adapter/_call.c index dca2e49373b..d8806e56805 100644 --- a/src/python/src/grpc/_adapter/_call.c +++ b/src/python/src/grpc/_adapter/_call.c @@ -45,7 +45,7 @@ static int pygrpc_call_init(Call *self, PyObject *args, PyObject *kwds) { const PyObject *channel; const char *method; const char *host; - const double deadline; + double deadline; static char *kwlist[] = {"channel", "method", "host", "deadline", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!ssd:Call", kwlist,