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.
pull/1027/head
Nicolas "Pixel" Noble 10 years ago
parent e7268b8f84
commit 8a6b38c9be
  1. 2
      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 PyObject *channel;
const char *method; const char *method;
const char *host; const char *host;
const double deadline; double deadline;
static char *kwlist[] = {"channel", "method", "host", "deadline", NULL}; static char *kwlist[] = {"channel", "method", "host", "deadline", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!ssd:Call", kwlist, if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!ssd:Call", kwlist,

Loading…
Cancel
Save