diff options
author | 2015-04-30 15:22:48 -0700 | |
---|---|---|
committer | 2015-04-30 15:22:48 -0700 | |
commit | 51fe022db0441e376139064429004fcd664e8f88 (patch) | |
tree | c62d532a57752041938b84b02e6c12ab506e5e15 | |
parent | 0225f5cbf599fe62603c7d04952e77cb5772b3af (diff) | |
parent | 64237fb02d312141b451079215f199ae5eaa3020 (diff) |
Merge pull request #1439 from nicolasnoble/python-c89
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 { |