Really fix python.

pull/9465/head
Mark D. Roth 8 years ago
parent 9d76dbe5d3
commit db74844fb6
  1. 15
      src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
  2. 4
      src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi

@ -279,12 +279,21 @@ cdef extern from "grpc/grpc.h":
ctypedef struct grpc_op_data_recv_close_on_server: ctypedef struct grpc_op_data_recv_close_on_server:
int *cancelled 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: union grpc_op_data:
grpc_op_data_send_initial_metadata send_initial_metadata 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_op_data_send_status_from_server send_status_from_server
grpc_metadata_array *receive_initial_metadata "recv_initial_metadata" grpc_op_data_receive_initial_metadata receive_initial_metadata "recv_initial_metadata"
grpc_byte_buffer **receive_message "recv_message" 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_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" grpc_op_data_recv_close_on_server receive_close_on_server "recv_close_on_server"

@ -639,7 +639,7 @@ def operation_receive_initial_metadata(int flags):
op.c_op.type = GRPC_OP_RECV_INITIAL_METADATA op.c_op.type = GRPC_OP_RECV_INITIAL_METADATA
op.c_op.flags = flags op.c_op.flags = flags
op._received_metadata = Metadata([]) 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._received_metadata.c_metadata_array)
op.is_valid = True op.is_valid = True
return op 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, # 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 # anyway, so we just let that be handled by the ByteBuffer() we allocated
# the line before. # 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._received_message.c_byte_buffer)
op.is_valid = True op.is_valid = True
return op return op

Loading…
Cancel
Save