aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Nathaniel Manista <nathaniel@google.com>2017-09-19 19:49:43 -0700
committerGravatar GitHub <noreply@github.com>2017-09-19 19:49:43 -0700
commit1bf1b586c7af6e4a302f6aed5649231e308d1bd8 (patch)
treec0389cec3b3b0af2b542c9c2638a58c0765f5aab
parent0b1e8914be8a97bbe78cd0ad764371d8da274685 (diff)
parent2746bd59982a5c186cf12d2007c73bd9fc4c3e33 (diff)
Merge pull request #12639 from kpayson64/fix_import
Fix cython definition to match c definition.
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi2
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
index 28cf114451..840af5c43a 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.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
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
index 0a2a6eee05..d860173b5d 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
@@ -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