Fix cython definition to match c definition

This is required to compile with Cython options that
are more strict about const correctness.
pull/12639/head
Ken Payson 8 years ago
parent 0aedb8136f
commit 2746bd5998
  1. 2
      src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
  2. 2
      src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi

@ -523,7 +523,7 @@ cdef extern from "grpc/compression.h":
int grpc_compression_algorithm_parse(
grpc_slice value, grpc_compression_algorithm *algorithm) nogil
int grpc_compression_algorithm_name(grpc_compression_algorithm algorithm,
char **name) nogil
const char **name) nogil
grpc_compression_algorithm grpc_compression_algorithm_for_level(
grpc_compression_level level, uint32_t accepted_encodings) nogil
void grpc_compression_options_init(grpc_compression_options *opts) nogil

@ -782,7 +782,7 @@ cdef class CompressionOptions:
def compression_algorithm_name(grpc_compression_algorithm algorithm):
cdef char* name
cdef const char* name
with nogil:
grpc_compression_algorithm_name(algorithm, &name)
# Let Cython do the right thing with string casting

Loading…
Cancel
Save