Prefix functions in ChannelArgsUtil

pull/16190/head
Muxi Yan 6 years ago
parent a0f83554bb
commit 1a88be4edf
  1. 4
      src/objective-c/GRPCClient/private/ChannelArgsUtil.h
  2. 4
      src/objective-c/GRPCClient/private/ChannelArgsUtil.m
  3. 4
      src/objective-c/GRPCClient/private/GRPCInsecureChannelFactory.m
  4. 4
      src/objective-c/GRPCClient/private/GRPCSecureChannelFactory.m

@ -20,6 +20,6 @@
#include <grpc/impl/codegen/grpc_types.h>
void FreeChannelArgs(grpc_channel_args* channel_args);
void GRPCFreeChannelArgs(grpc_channel_args* channel_args);
grpc_channel_args* BuildChannelArgs(NSDictionary* dictionary);
grpc_channel_args* GRPCBuildChannelArgs(NSDictionary* dictionary);

@ -39,7 +39,7 @@ static int cmp_pointer_arg(void *p, void *q) { return p == q; }
static const grpc_arg_pointer_vtable objc_arg_vtable = {copy_pointer_arg, destroy_pointer_arg,
cmp_pointer_arg};
void FreeChannelArgs(grpc_channel_args *channel_args) {
void GRPCFreeChannelArgs(grpc_channel_args *channel_args) {
for (size_t i = 0; i < channel_args->num_args; ++i) {
grpc_arg *arg = &channel_args->args[i];
gpr_free(arg->key);
@ -58,7 +58,7 @@ void FreeChannelArgs(grpc_channel_args *channel_args) {
* 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 *BuildChannelArgs(NSDictionary *dictionary) {
grpc_channel_args *GRPCBuildChannelArgs(NSDictionary *dictionary) {
if (!dictionary) {
return NULL;
}

@ -36,10 +36,10 @@ NS_ASSUME_NONNULL_BEGIN
- (nullable grpc_channel *)createChannelWithHost:(NSString *)host
channelArgs:(nullable NSDictionary *)args {
grpc_channel_args *coreChannelArgs = BuildChannelArgs([args copy]);
grpc_channel_args *coreChannelArgs = GRPCBuildChannelArgs([args copy]);
grpc_channel *unmanagedChannel =
grpc_insecure_channel_create(host.UTF8String, coreChannelArgs, NULL);
FreeChannelArgs(coreChannelArgs);
GRPCFreeChannelArgs(coreChannelArgs);
return unmanagedChannel;
}

@ -111,10 +111,10 @@ NS_ASSUME_NONNULL_BEGIN
- (nullable grpc_channel *)createChannelWithHost:(NSString *)host
channelArgs:(nullable NSDictionary *)args {
grpc_channel_args *coreChannelArgs = BuildChannelArgs([args copy]);
grpc_channel_args *coreChannelArgs = GRPCBuildChannelArgs([args copy]);
grpc_channel *unmanagedChannel =
grpc_secure_channel_create(_channelCreds, host.UTF8String, coreChannelArgs, NULL);
FreeChannelArgs(coreChannelArgs);
GRPCFreeChannelArgs(coreChannelArgs);
return unmanagedChannel;
}

Loading…
Cancel
Save