Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.2 注册全局对象 wl_resource_create #10

Open
qaqland opened this issue Apr 4, 2024 · 0 comments
Open

5.2 注册全局对象 wl_resource_create #10

qaqland opened this issue Apr 4, 2024 · 0 comments

Comments

@qaqland
Copy link
Collaborator

qaqland commented Apr 4, 2024

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

	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

不知道理解对不对💫

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant