Add op index support for custom hooks

pull/16223/head
Mehrdad Afshari 7 years ago
parent c666aa6151
commit f61e16144e
  1. 2
      src/python/grpcio/grpc/_cython/_cygrpc/_hooks.pxd.pxi
  2. 4
      src/python/grpcio/grpc/_cython/_cygrpc/_hooks.pyx.pxi
  3. 4
      src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi

@ -13,4 +13,4 @@
# limitations under the License.
cdef object _custom_op_on_c_call(grpc_call *call)
cdef object _custom_op_on_c_call(int op, grpc_call *call)

@ -13,5 +13,5 @@
# limitations under the License.
cdef object _custom_op_on_c_call(grpc_call *call):
return None
cdef object _custom_op_on_c_call(int op, grpc_call *call):
raise NotImplementedError("No custom hooks are implemented")

@ -94,5 +94,5 @@ cdef class Call:
def is_valid(self):
return self.c_call != NULL
def _custom_op_on_c_call(self):
return _custom_op_on_c_call(self.c_call)
def _custom_op_on_c_call(self, int op):
return _custom_op_on_c_call(op, self.c_call)

Loading…
Cancel
Save