diff --git a/src/python/src/grpc/_adapter/_completion_queue.c b/src/python/src/grpc/_adapter/_completion_queue.c index 5f1cb2a3a68..f616faf629b 100644 --- a/src/python/src/grpc/_adapter/_completion_queue.c +++ b/src/python/src/grpc/_adapter/_completion_queue.c @@ -354,6 +354,8 @@ static PyObject *pygrpc_completion_queue_get(CompletionQueue *self, PyObject *event_args; PyObject *event; + pygrpc_tag *tag; + if (!(PyArg_ParseTuple(args, "O:get", &deadline))) { return NULL; } @@ -380,7 +382,7 @@ static PyObject *pygrpc_completion_queue_get(CompletionQueue *self, Py_RETURN_NONE; } - pygrpc_tag *tag = (pygrpc_tag *)c_event->tag; + tag = (pygrpc_tag *)c_event->tag; switch (c_event->type) { case GRPC_QUEUE_SHUTDOWN: diff --git a/src/python/src/grpc/_adapter/_tag.h b/src/python/src/grpc/_adapter/_tag.h index 82987ea102c..b18c44576da 100644 --- a/src/python/src/grpc/_adapter/_tag.h +++ b/src/python/src/grpc/_adapter/_tag.h @@ -51,7 +51,7 @@ typedef enum { PYGRPC_FINISH_ACCEPTED = 4, PYGRPC_CLIENT_METADATA_READ = 5, PYGRPC_FINISHED_CLIENT = 6, - PYGRPC_FINISHED_SERVER = 7, + PYGRPC_FINISHED_SERVER = 7 } pygrpc_tag_type; typedef struct {