mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	util: Add wl_list_insert_list()
This commit is contained in:
		
							parent
							
								
									3175e91efa
								
							
						
					
					
						commit
						51f50b8c64
					
				
					 2 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -70,6 +70,15 @@ wl_list_empty(struct wl_list *list)
 | 
			
		|||
	return list->next == list;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
WL_EXPORT void
 | 
			
		||||
wl_list_insert_list(struct wl_list *list, struct wl_list *other)
 | 
			
		||||
{
 | 
			
		||||
	other->next->prev = list;
 | 
			
		||||
	other->prev->next = list->next;
 | 
			
		||||
	list->next->prev = other->prev;
 | 
			
		||||
	list->next = other->next;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
WL_EXPORT void
 | 
			
		||||
wl_array_init(struct wl_array *array)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -115,6 +115,7 @@ void wl_list_insert(struct wl_list *list, struct wl_list *elm);
 | 
			
		|||
void wl_list_remove(struct wl_list *elm);
 | 
			
		||||
int wl_list_length(struct wl_list *list);
 | 
			
		||||
int wl_list_empty(struct wl_list *list);
 | 
			
		||||
void wl_list_insert_list(struct wl_list *list, struct wl_list *other);
 | 
			
		||||
 | 
			
		||||
#define __container_of(ptr, sample, member)				\
 | 
			
		||||
	(void *)((char *)(ptr)	-					\
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue