Skip to content

Commit f61e161

Browse files
committed
Add op index support for custom hooks
1 parent c666aa6 commit f61e161

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/python/grpcio/grpc/_cython/_cygrpc/_hooks.pxd.pxi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# limitations under the License.
1414

1515

16-
cdef object _custom_op_on_c_call(grpc_call *call)
16+
cdef object _custom_op_on_c_call(int op, grpc_call *call)

‎src/python/grpcio/grpc/_cython/_cygrpc/_hooks.pyx.pxi‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414

1515

16-
cdef object _custom_op_on_c_call(grpc_call *call):
17-
return None
16+
cdef object _custom_op_on_c_call(int op, grpc_call *call):
17+
raise NotImplementedError("No custom hooks are implemented")

‎src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,5 @@ cdef class Call:
9494
def is_valid(self):
9595
return self.c_call != NULL
9696

97-
def _custom_op_on_c_call(self):
98-
return _custom_op_on_c_call(self.c_call)
97+
def _custom_op_on_c_call(self, int op):
98+
return _custom_op_on_c_call(op, self.c_call)

0 commit comments

Comments
 (0)