Fix memory usage
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index 444f979..89cccab 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -177,8 +177,8 @@
/* A single metadata element */
typedef struct grpc_metadata {
- char *key;
- char *value;
+ const char *key;
+ const char *value;
size_t value_length;
} grpc_metadata;
@@ -292,9 +292,13 @@
grpc_status_code status;
const char *status_details;
} send_status_from_server;
+ /* ownership of the array is with the caller, but ownership of the elements
+ stays with the call object */
grpc_metadata_array *recv_initial_metadata;
grpc_byte_buffer **recv_message;
struct {
+ /* ownership of the array is with the caller, but ownership of the elements
+ stays with the call object */
grpc_metadata_array *trailing_metadata;
grpc_status_code *status;
char **status_details;