aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python
diff options
context:
space:
mode:
authorGravatar Masood Malekghassemi <soltanmm@users.noreply.github.com>2016-01-04 15:46:08 -0800
committerGravatar Masood Malekghassemi <soltanmm@users.noreply.github.com>2016-01-04 15:46:08 -0800
commit8525354f4f4b5023fa25188cd5ce00750bab57ca (patch)
tree618e9723ba20c11b917b0290d4621be69e76ac7e /src/python
parentb121d44dc657967ad97d68aed48c108b416cc57d (diff)
Use stdint for Cython code
Diffstat (limited to 'src/python')
-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)