diff options
author | 2015-05-01 00:12:26 +0200 | |
---|---|---|
committer | 2015-05-01 00:12:26 +0200 | |
commit | 64237fb02d312141b451079215f199ae5eaa3020 (patch) | |
tree | ac88d285be17d4ccffcb76beee0c9bec9b38a011 | |
parent | 7e8ecf7afeb4398e45d5fcffca6293b98fffa754 (diff) |
C89-ify the python code.
-rw-r--r-- | src/python/src/grpc/_adapter/_completion_queue.c | 4 | ||||
-rw-r--r-- | src/python/src/grpc/_adapter/_tag.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/python/src/grpc/_adapter/_completion_queue.c b/src/python/src/grpc/_adapter/_completion_queue.c index 5f1cb2a3a6..f616faf629 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 82987ea102..b18c44576d 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 { |