Add clear function that clears the linked list.
This commit is contained in:
		
							parent
							
								
									4c7f0ee0e5
								
							
						
					
					
						commit
						75ff581de3
					
				| @ -109,5 +109,12 @@ void* ll_pophead(ll* ll); | |||||||
|  */ |  */ | ||||||
| void* ll_poptail(ll* ll); | void* ll_poptail(ll* ll); | ||||||
| 
 | 
 | ||||||
|  | /**
 | ||||||
|  |  * Removes all elements from the list, freeing the underlying memory | ||||||
|  |  * but keeping the data intact, | ||||||
|  |  * @param ll the linked list to clear. | ||||||
|  |  */ | ||||||
|  | void ll_clear(ll* ll); | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user