the_wayland_protocol_zh_CN icon indicating copy to clipboard operation
the_wayland_protocol_zh_CN copied to clipboard

5.2 注册全局对象 wl_resource_create

Open qaqland opened this issue 1 year ago • 0 comments

关于全局对象的解构函数,代码大概是这样写的:

	resource = wl_resource_create(client, &wl_output_interface, version, id);
	if (!resource) {
		wl_client_post_no_memory(client);
		return;
	}

	wl_resource_set_implementation(resource, &wl_output_impl, 0, wl_resource_destroy_func);

所以原文中描述的

This function is also passed into wl_resource_create as the destructor

应当为 wl_resource_set_implementation

不知道理解对不对💫

qaqland avatar Apr 04 '24 14:04 qaqland