aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2017-01-26 08:04:15 -0800
committerGravatar Mark D. Roth <roth@google.com>2017-01-26 08:04:15 -0800
commitdb74844fb6331370b1804d0034025fe27e8098ce (patch)
tree4d5e9bdfcf0c0fd58505343a883835d6f4a48fa4 /src/python/grpcio
parent9d76dbe5d37a0421c94f19deaa2301acb4f97556 (diff)
Really fix python.
Diffstat (limited to 'src/python/grpcio')
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi15
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi4
2 files changed, 14 insertions, 5 deletions
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
index ad766186bd..348d42cb0b 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
@@ -279,12 +279,21 @@ cdef extern from "grpc/grpc.h":
ctypedef struct grpc_op_data_recv_close_on_server:
int *cancelled
+ ctypedef struct grpc_op_data_send_message:
+ grpc_byte_buffer *send_message
+
+ ctypedef struct grpc_op_data_receive_message:
+ grpc_byte_buffer **receive_message "recv_message"
+
+ ctypedef struct grpc_op_data_receive_initial_metadata:
+ grpc_metadata_array *receive_initial_metadata "recv_initial_metadata"
+
union grpc_op_data:
grpc_op_data_send_initial_metadata send_initial_metadata
- grpc_byte_buffer *send_message
+ grpc_op_data_send_message send_message
grpc_op_data_send_status_from_server send_status_from_server
- grpc_metadata_array *receive_initial_metadata "recv_initial_metadata"
- grpc_byte_buffer **receive_message "recv_message"
+ grpc_op_data_receive_initial_metadata receive_initial_metadata "recv_initial_metadata"
+ grpc_op_data_receive_message receive_message "recv_message"
grpc_op_data_recv_status_on_client receive_status_on_client "recv_status_on_client"
grpc_op_data_recv_close_on_server receive_close_on_server "recv_close_on_server"
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
index aee5d3c188..07385129ef 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
@@ -639,7 +639,7 @@ def operation_receive_initial_metadata(int flags):
op.c_op.type = GRPC_OP_RECV_INITIAL_METADATA
op.c_op.flags = flags
op._received_metadata = Metadata([])
- op.c_op.data.recv_initial_metadata.receive_initial_metadata = (
+ op.c_op.data.receive_initial_metadata.receive_initial_metadata = (
&op._received_metadata.c_metadata_array)
op.is_valid = True
return op
@@ -652,7 +652,7 @@ def operation_receive_message(int flags):
# n.b. the c_op.data.receive_message field needs to be deleted by us,
# anyway, so we just let that be handled by the ByteBuffer() we allocated
# the line before.
- op.c_op.data.recv_message.receive_message = (
+ op.c_op.data.receive_message.receive_message = (
&op._received_message.c_byte_buffer)
op.is_valid = True
return op