diff options
author | 2018-10-19 17:33:50 -0700 | |
---|---|---|
committer | 2018-10-19 17:34:15 -0700 | |
commit | 8cecb2a86dd5904c68f46d4b685b11c8cb0a8704 (patch) | |
tree | b309d2945692c76427cced0e53bfb922d3a47f65 | |
parent | 789108d16d72c61b6df4135796116d3cffce0a58 (diff) |
Write comments for functions in ChannelArgsUtil
-rw-r--r-- | src/objective-c/GRPCClient/private/ChannelArgsUtil.h | 9 | ||||
-rw-r--r-- | src/objective-c/GRPCClient/private/ChannelArgsUtil.m | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/objective-c/GRPCClient/private/ChannelArgsUtil.h b/src/objective-c/GRPCClient/private/ChannelArgsUtil.h index d0be484910..3fb876ecc4 100644 --- a/src/objective-c/GRPCClient/private/ChannelArgsUtil.h +++ b/src/objective-c/GRPCClient/private/ChannelArgsUtil.h @@ -20,6 +20,15 @@ #include <grpc/impl/codegen/grpc_types.h> +/** Free resources in the grpc core struct grpc_channel_args */ void GRPCFreeChannelArgs(grpc_channel_args* channel_args); +/** + * Allocates a @c grpc_channel_args and populates it with the options specified in the + * @c dictionary. Keys must be @c NSString, @c NSNumber, or a pointer. If the value responds to + * @c @selector(UTF8String) then it will be mapped to @c GRPC_ARG_STRING. If the value responds to + * @c @selector(intValue), it will be mapped to @c GRPC_ARG_INTEGER. Otherwise, if the value is not + * nil, it is mapped as a pointer. The caller of this function is responsible for calling + * @c GRPCFreeChannelArgs to free the @c grpc_channel_args struct. + */ grpc_channel_args* GRPCBuildChannelArgs(NSDictionary* dictionary); diff --git a/src/objective-c/GRPCClient/private/ChannelArgsUtil.m b/src/objective-c/GRPCClient/private/ChannelArgsUtil.m index 8669f79992..b8342a79e7 100644 --- a/src/objective-c/GRPCClient/private/ChannelArgsUtil.m +++ b/src/objective-c/GRPCClient/private/ChannelArgsUtil.m @@ -51,13 +51,6 @@ void GRPCFreeChannelArgs(grpc_channel_args *channel_args) { gpr_free(channel_args); } -/** - * Allocates a @c grpc_channel_args and populates it with the options specified in the - * @c dictionary. Keys must be @c NSString. If the value responds to @c @selector(UTF8String) then - * it will be mapped to @c GRPC_ARG_STRING. If not, it will be mapped to @c GRPC_ARG_INTEGER if the - * value responds to @c @selector(intValue). Otherwise, an exception will be raised. The caller of - * this function is responsible for calling @c freeChannelArgs on a non-NULL returned value. - */ grpc_channel_args *GRPCBuildChannelArgs(NSDictionary *dictionary) { if (!dictionary) { return NULL; |