aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio
diff options
context:
space:
mode:
authorGravatar jboeuf <jboeuf@users.noreply.github.com>2016-01-06 12:50:53 -0800
committerGravatar jboeuf <jboeuf@users.noreply.github.com>2016-01-06 12:50:53 -0800
commitbbb94bd6fcb85c27498c85724340bbaaf30be6b0 (patch)
tree6bd22ace94e99d04cb8ca619eccc737afb219858 /src/python/grpcio
parent38b6eeeb4eccf162f2ff0c288043cc89b6498644 (diff)
parent6a56221f280742c97dedca04896d5e6a5493f54e (diff)
Merge pull request #4562 from ctiller/ints
Switch to using C99 types for fixed size integers
Diffstat (limited to 'src/python/grpcio')
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxd18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxd b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxd
index 2b8c19d69c..9b10d2ae75 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxd
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxd
@@ -28,6 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cimport libc.time
+from libc.stdint cimport int64_t, uint32_t, int32_t
cdef extern from "grpc/support/alloc.h":
@@ -55,15 +56,6 @@ cdef extern from "grpc/support/slice.h":
size_t gpr_slice_length "GPR_SLICE_LENGTH" (gpr_slice s)
-cdef extern from "grpc/support/port_platform.h":
- # As long as the header file gets this type right, we don't need to get this
- # type exactly; just close enough that the operations will be supported in the
- # underlying C layers.
- ctypedef unsigned int gpr_uint32
- ctypedef int gpr_int32
- ctypedef long int gpr_int64
-
-
cdef extern from "grpc/support/time.h":
ctypedef enum gpr_clock_type:
@@ -73,8 +65,8 @@ cdef extern from "grpc/support/time.h":
GPR_TIMESPAN
ctypedef struct gpr_timespec:
- gpr_int64 seconds "tv_sec"
- gpr_int32 nanoseconds "tv_nsec"
+ int64_t seconds "tv_sec"
+ int32_t nanoseconds "tv_nsec"
gpr_clock_type clock_type
gpr_timespec gpr_time_0(gpr_clock_type type)
@@ -282,7 +274,7 @@ cdef extern from "grpc/grpc.h":
ctypedef struct grpc_op:
grpc_op_type type "op"
- gpr_uint32 flags
+ uint32_t flags
grpc_op_data data
void grpc_init()
@@ -313,7 +305,7 @@ cdef extern from "grpc/grpc.h":
void *reserved)
grpc_call *grpc_channel_create_call(grpc_channel *channel,
grpc_call *parent_call,
- gpr_uint32 propagation_mask,
+ uint32_t propagation_mask,
grpc_completion_queue *completion_queue,
const char *method, const char *host,
gpr_timespec deadline, void *reserved)