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

Unsafe Iterators #1

Closed
mitsuhiko opened this issue Sep 23, 2021 · 0 comments · Fixed by #30
Closed

Unsafe Iterators #1

mitsuhiko opened this issue Sep 23, 2021 · 0 comments · Fixed by #30
Labels
enhancement New feature or request

Comments

@mitsuhiko
Copy link
Owner

The library generally holds on to values by using Arc<T> internally. The challenge with this is that iteration over values (in the VM) depends on the iterator being on the context stack which does not work with lifetimes. As a result the current implementation creates a value iterator without lifetimes that unsafely holds a reference to the rust collection iterators of the underlying value types. This works because the refcount is also kept alive but it's an improper use of unsafe.

There might be better ways to do this.

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

Successfully merging a pull request may close this issue.

1 participant