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

Fix/port access #262

Closed
wants to merge 3 commits into from
Closed

Fix/port access #262

wants to merge 3 commits into from

Conversation

xinyuli1204
Copy link
Contributor

auto p = new Port(reinterpret_cast<Port>(obj));
p->set_index(index);
*ptr = reinterpret_cast<ion_port_t>(p);
reinterpret_castion::Port*(obj)->set_index(index);

obj doen't need to set_index, otherwise have issue on following example


p0 = ports[0]
p1 = ports[1]
when access ports again, the index of ports will be 0 instead of -1


@xinyuli1204 xinyuli1204 marked this pull request as draft April 5, 2024 00:56
@xinyuli1204 xinyuli1204 closed this Apr 5, 2024
@xinyuli1204 xinyuli1204 deleted the fix/port-access branch April 5, 2024 20:14
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

Successfully merging this pull request may close these issues.

1 participant