| 
														
															@@ -51,9 +51,9 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * grpc_call_credentials */ 
														 | 
														
														 | 
														
															  * grpc_call_credentials */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 static VALUE grpc_rb_cCallCredentials = Qnil; 
														 | 
														
														 | 
														
															 static VALUE grpc_rb_cCallCredentials = Qnil; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-/* grpc_rb_call_credentials wraps a grpc_call_credentials. It provides a peer 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- * ruby object, 'mark' to minimize copying when a credential is created from 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- * ruby. */ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+/* grpc_rb_call_credentials wraps a grpc_call_credentials. It provides a mark 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ * object that is used to hold references to any objects used to create the 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ * credentials. */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 typedef struct grpc_rb_call_credentials { 
														 | 
														
														 | 
														
															 typedef struct grpc_rb_call_credentials { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   /* Holder of ruby objects involved in contructing the credentials */ 
														 | 
														
														 | 
														
															   /* Holder of ruby objects involved in contructing the credentials */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   VALUE mark; 
														 | 
														
														 | 
														
															   VALUE mark; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -156,13 +156,8 @@ static void grpc_rb_call_credentials_free(void *p) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     return; 
														 | 
														
														 | 
														
															     return; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   wrapper = (grpc_rb_call_credentials *)p; 
														 | 
														
														 | 
														
															   wrapper = (grpc_rb_call_credentials *)p; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  /* Delete the wrapped object if the mark object is Qnil, which indicates that 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-   * no other object is the actual owner. */ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  if (wrapper->wrapped != NULL && wrapper->mark == Qnil) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    grpc_call_credentials_release(wrapper->wrapped); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    wrapper->wrapped = NULL; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  grpc_call_credentials_release(wrapper->wrapped); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  wrapper->wrapped = NULL; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   xfree(p); 
														 | 
														
														 | 
														
															   xfree(p); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -174,8 +169,6 @@ static void grpc_rb_call_credentials_mark(void *p) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     return; 
														 | 
														
														 | 
														
															     return; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   wrapper = (grpc_rb_call_credentials *)p; 
														 | 
														
														 | 
														
															   wrapper = (grpc_rb_call_credentials *)p; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  /* If it's not already cleaned up, mark the mark object */ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   if (wrapper->mark != Qnil) { 
														 | 
														
														 | 
														
															   if (wrapper->mark != Qnil) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     rb_gc_mark(wrapper->mark); 
														 | 
														
														 | 
														
															     rb_gc_mark(wrapper->mark); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -204,7 +197,7 @@ static VALUE grpc_rb_call_credentials_alloc(VALUE cls) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 /* Creates a wrapping object for a given call credentials. This should only be 
														 | 
														
														 | 
														
															 /* Creates a wrapping object for a given call credentials. This should only be 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * called with grpc_call_credentials objects that are not already associated 
														 | 
														
														 | 
														
															  * called with grpc_call_credentials objects that are not already associated 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * with any Ruby object */ 
														 | 
														
														 | 
														
															  * with any Ruby object */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-VALUE grpc_rb_wrap_call_credentials(grpc_call_credentials *c) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+VALUE grpc_rb_wrap_call_credentials(grpc_call_credentials *c, VALUE mark) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   VALUE rb_wrapper; 
														 | 
														
														 | 
														
															   VALUE rb_wrapper; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   grpc_rb_call_credentials *wrapper; 
														 | 
														
														 | 
														
															   grpc_rb_call_credentials *wrapper; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   if (c == NULL) { 
														 | 
														
														 | 
														
															   if (c == NULL) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -214,6 +207,7 @@ VALUE grpc_rb_wrap_call_credentials(grpc_call_credentials *c) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   TypedData_Get_Struct(rb_wrapper, grpc_rb_call_credentials, 
														 | 
														
														 | 
														
															   TypedData_Get_Struct(rb_wrapper, grpc_rb_call_credentials, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                        &grpc_rb_call_credentials_data_type, wrapper); 
														 | 
														
														 | 
														
															                        &grpc_rb_call_credentials_data_type, wrapper); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   wrapper->wrapped = c; 
														 | 
														
														 | 
														
															   wrapper->wrapped = c; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  wrapper->mark = mark; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   return rb_wrapper; 
														 | 
														
														 | 
														
															   return rb_wrapper; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -277,6 +271,7 @@ static VALUE grpc_rb_call_credentials_init(VALUE self, VALUE proc) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     return Qnil; 
														 | 
														
														 | 
														
															     return Qnil; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  wrapper->mark = proc; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   wrapper->wrapped = creds; 
														 | 
														
														 | 
														
															   wrapper->wrapped = creds; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   rb_ivar_set(self, id_callback, proc); 
														 | 
														
														 | 
														
															   rb_ivar_set(self, id_callback, proc); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -287,15 +282,18 @@ static VALUE grpc_rb_call_credentials_compose(int argc, VALUE *argv, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                                               VALUE self) { 
														 | 
														
														 | 
														
															                                               VALUE self) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   grpc_call_credentials *creds; 
														 | 
														
														 | 
														
															   grpc_call_credentials *creds; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   grpc_call_credentials *other; 
														 | 
														
														 | 
														
															   grpc_call_credentials *other; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  VALUE mark; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   if (argc == 0) { 
														 | 
														
														 | 
														
															   if (argc == 0) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     return self; 
														 | 
														
														 | 
														
															     return self; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  mark = rb_ary_new(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   creds = grpc_rb_get_wrapped_call_credentials(self); 
														 | 
														
														 | 
														
															   creds = grpc_rb_get_wrapped_call_credentials(self); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   for (int i = 0; i < argc; i++) { 
														 | 
														
														 | 
														
															   for (int i = 0; i < argc; i++) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    rb_ary_push(mark, argv[i]); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     other = grpc_rb_get_wrapped_call_credentials(argv[i]); 
														 | 
														
														 | 
														
															     other = grpc_rb_get_wrapped_call_credentials(argv[i]); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     creds = grpc_composite_call_credentials_create(creds, other, NULL); 
														 | 
														
														 | 
														
															     creds = grpc_composite_call_credentials_create(creds, other, NULL); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  return grpc_rb_wrap_call_credentials(creds); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  return grpc_rb_wrap_call_credentials(creds, mark); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 void Init_grpc_call_credentials() { 
														 | 
														
														 | 
														
															 void Init_grpc_call_credentials() { 
														 |