mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	[DOC] Fixed st_udpate comment [ci skip]
Clarified that the first and second arguments to the callback function are pointers to the KEY and the VALUE, but not those values themselves.
This commit is contained in:
		
							parent
							
								
									b408d32bf2
								
							
						
					
					
						commit
						7e1dbe5975
					
				
					 1 changed files with 9 additions and 8 deletions
				
			
		
							
								
								
									
										17
									
								
								st.c
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								st.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1368,14 +1368,15 @@ st_cleanup_safe(st_table *tab ATTRIBUTE_UNUSED,
 | 
			
		|||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Find entry with KEY in table TAB, call FUNC with the key and the
 | 
			
		||||
   value of the found entry, and non-zero as the 3rd argument.  If the
 | 
			
		||||
   entry is not found, call FUNC with KEY, and 2 zero arguments.  If
 | 
			
		||||
   the call returns ST_CONTINUE, the table will have an entry with key
 | 
			
		||||
   and value returned by FUNC through the 1st and 2nd parameters.  If
 | 
			
		||||
   the call of FUNC returns ST_DELETE, the table will not have entry
 | 
			
		||||
   with KEY.  The function returns flag of that the entry with KEY was
 | 
			
		||||
   in the table before the call.  */
 | 
			
		||||
/* Find entry with KEY in table TAB, call FUNC with pointers to copies
 | 
			
		||||
   of the key and the value of the found entry, and non-zero as the
 | 
			
		||||
   3rd argument.  If the entry is not found, call FUNC with a pointer
 | 
			
		||||
   to KEY, a pointer to zero, and a zero argument.  If the call
 | 
			
		||||
   returns ST_CONTINUE, the table will have an entry with key and
 | 
			
		||||
   value returned by FUNC through the 1st and 2nd parameters.  If the
 | 
			
		||||
   call of FUNC returns ST_DELETE, the table will not have entry with
 | 
			
		||||
   KEY.  The function returns flag of that the entry with KEY was in
 | 
			
		||||
   the table before the call.  */
 | 
			
		||||
int
 | 
			
		||||
st_update(st_table *tab, st_data_t key,
 | 
			
		||||
	  st_update_callback_func *func, st_data_t arg)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue