aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/transport/chttp2/transport/stream_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ext/transport/chttp2/transport/stream_map.h')
-rw-r--r--src/core/ext/transport/chttp2/transport/stream_map.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/core/ext/transport/chttp2/transport/stream_map.h b/src/core/ext/transport/chttp2/transport/stream_map.h
index 7ab6a4f5ed..c89d20047c 100644
--- a/src/core/ext/transport/chttp2/transport/stream_map.h
+++ b/src/core/ext/transport/chttp2/transport/stream_map.h
@@ -34,40 +34,40 @@ extern "C" {
Adds are restricted to strictly higher keys than previously seen (this is
guaranteed by http2). */
typedef struct {
- uint32_t *keys;
- void **values;
+ uint32_t* keys;
+ void** values;
size_t count;
size_t free;
size_t capacity;
} grpc_chttp2_stream_map;
-void grpc_chttp2_stream_map_init(grpc_chttp2_stream_map *map,
+void grpc_chttp2_stream_map_init(grpc_chttp2_stream_map* map,
size_t initial_capacity);
-void grpc_chttp2_stream_map_destroy(grpc_chttp2_stream_map *map);
+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, uint32_t key,
- void *value);
+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, uint32_t key);
+void* grpc_chttp2_stream_map_delete(grpc_chttp2_stream_map* map, uint32_t key);
/* Return an existing key, or NULL if it does not exist */
-void *grpc_chttp2_stream_map_find(grpc_chttp2_stream_map *map, uint32_t key);
+void* grpc_chttp2_stream_map_find(grpc_chttp2_stream_map* map, uint32_t key);
/* Return a random entry */
-void *grpc_chttp2_stream_map_rand(grpc_chttp2_stream_map *map);
+void* grpc_chttp2_stream_map_rand(grpc_chttp2_stream_map* map);
/* How many (populated) entries are in the stream map? */
-size_t grpc_chttp2_stream_map_size(grpc_chttp2_stream_map *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, uint32_t key,
- void *value),
- void *user_data);
+void grpc_chttp2_stream_map_for_each(grpc_chttp2_stream_map* map,
+ void (*f)(void* user_data, uint32_t key,
+ void* value),
+ void* user_data);
#ifdef __cplusplus
}