mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	Right now compositors need to manually check that enum values sent by the client are valid. In particular: - Check that the value sent by the client is not outside of the enum. - Check that the version of the enum entry is consistent with the object version. Automatically generate validator functions to perform these tasks. Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/104
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			359 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			359 B
		
	
	
	
		
			C
		
	
	
	
	
	
/* SCANNER TEST */
 | 
						|
 | 
						|
#include <stdbool.h>
 | 
						|
#include <stdlib.h>
 | 
						|
#include <stdint.h>
 | 
						|
#include "wayland-util.h"
 | 
						|
 | 
						|
 | 
						|
static const struct wl_interface *empty_types[] = {
 | 
						|
};
 | 
						|
 | 
						|
static const struct wl_message empty_requests[] = {
 | 
						|
	{ "empty", "", empty_types + 0 },
 | 
						|
};
 | 
						|
 | 
						|
WL_EXPORT const struct wl_interface empty_interface = {
 | 
						|
	"empty", 1,
 | 
						|
	1, empty_requests,
 | 
						|
	0, NULL,
 | 
						|
};
 | 
						|
 |