diff options
Diffstat (limited to 'src/core/transport/chttp2/stream_map.h')
-rw-r--r-- | src/core/transport/chttp2/stream_map.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/transport/chttp2/stream_map.h b/src/core/transport/chttp2/stream_map.h index 71b0582054..7a0e45fab2 100644 --- a/src/core/transport/chttp2/stream_map.h +++ b/src/core/transport/chttp2/stream_map.h @@ -38,14 +38,14 @@ #include <stddef.h> -/* Data structure to map a gpr_uint32 to a data object (represented by a void*) +/* Data structure to map a uint32_t to a data object (represented by a void*) Represented as a sorted array of keys, and a corresponding array of values. Lookups are performed with binary search. Adds are restricted to strictly higher keys than previously seen (this is guaranteed by http2). */ typedef struct { - gpr_uint32 *keys; + uint32_t *keys; void **values; size_t count; size_t free; @@ -58,27 +58,26 @@ void grpc_chttp2_stream_map_destroy(grpc_chttp2_stream_map *map); /* Add a new key: given http2 semantics, new keys must always be greater than existing keys - this is asserted */ -void grpc_chttp2_stream_map_add(grpc_chttp2_stream_map *map, gpr_uint32 key, +void grpc_chttp2_stream_map_add(grpc_chttp2_stream_map *map, uint32_t key, void *value); /* Delete an existing key - returns the previous value of the key if it existed, or NULL otherwise */ -void *grpc_chttp2_stream_map_delete(grpc_chttp2_stream_map *map, - gpr_uint32 key); +void *grpc_chttp2_stream_map_delete(grpc_chttp2_stream_map *map, uint32_t key); /* Move all elements of src into dst */ void grpc_chttp2_stream_map_move_into(grpc_chttp2_stream_map *src, grpc_chttp2_stream_map *dst); /* Return an existing key, or NULL if it does not exist */ -void *grpc_chttp2_stream_map_find(grpc_chttp2_stream_map *map, gpr_uint32 key); +void *grpc_chttp2_stream_map_find(grpc_chttp2_stream_map *map, uint32_t key); /* How many (populated) entries are in the stream map? */ size_t grpc_chttp2_stream_map_size(grpc_chttp2_stream_map *map); /* Callback on each stream */ void grpc_chttp2_stream_map_for_each(grpc_chttp2_stream_map *map, - void (*f)(void *user_data, gpr_uint32 key, + void (*f)(void *user_data, uint32_t key, void *value), void *user_data); |