mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	server: Pass struct wl_resource for object references
This commit is contained in:
		
							parent
							
								
									990809c063
								
							
						
					
					
						commit
						b15259bff4
					
				
					 2 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
					@ -526,7 +526,11 @@ emit_structs(struct wl_list *message_list, struct interface *interface)
 | 
				
			||||||
		wl_list_for_each(a, &m->arg_list, link) {
 | 
							wl_list_for_each(a, &m->arg_list, link) {
 | 
				
			||||||
			printf(",\n%s", indent(n));
 | 
								printf(",\n%s", indent(n));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (is_interface && a->type == OBJECT)
 | 
				
			||||||
 | 
									printf("struct wl_resource *");
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
				emit_type(a);
 | 
									emit_type(a);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			printf("%s", a->name);
 | 
								printf("%s", a->name);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -115,10 +115,11 @@ wl_shm_buffer_init(struct wl_shm *shm, struct wl_client *client, uint32_t id,
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
shm_create_buffer(struct wl_client *client, struct wl_resource *resource,
 | 
					shm_create_buffer(struct wl_client *client, struct wl_resource *resource,
 | 
				
			||||||
		  uint32_t id, int fd, int32_t width, int32_t height,
 | 
							  uint32_t id, int fd, int32_t width, int32_t height,
 | 
				
			||||||
		  uint32_t stride, struct wl_visual *visual)
 | 
							  uint32_t stride, struct wl_resource *visual_resource)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct wl_shm *shm = resource->data;
 | 
						struct wl_shm *shm = resource->data;
 | 
				
			||||||
	struct wl_shm_buffer *buffer;
 | 
						struct wl_shm_buffer *buffer;
 | 
				
			||||||
 | 
						struct wl_visual *visual = visual_resource->data;
 | 
				
			||||||
	void *data;
 | 
						void *data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!visual || visual->object.interface != &wl_visual_interface) {
 | 
						if (!visual || visual->object.interface != &wl_visual_interface) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue