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

Iterating through a hashtable #77

Closed
iddev5 opened this issue Apr 26, 2021 · 3 comments
Closed

Iterating through a hashtable #77

iddev5 opened this issue Apr 26, 2021 · 3 comments
Assignees

Comments

@iddev5
Copy link

iddev5 commented Apr 26, 2021

Hello,

There seems to be no function or standard way to do it (sorry if I missed something obvious). Looking at *_find's implementation, I tried to replicate it, but it caused segfaults (I didn't dived too much into it fearing I might be doing completely wrong thing here, and I am not familiar with the design of this particular hash table implementation).
So my suggestion: something like a void *_map(void (*f)(VALUE value)) function could work out great in such scenarios.

Thank you. Have a nice day!

@zpl-zak
Copy link
Member

zpl-zak commented Apr 26, 2021

Thanks for the suggestion, this can be added definitely!

@zpl-zak zpl-zak self-assigned this Apr 26, 2021
@zpl-zak
Copy link
Member

zpl-zak commented Apr 26, 2021

Feature has been implemented in https://github.com/zpl-c/zpl/releases/tag/13.2.0

Thanks again!

@iddev5
Copy link
Author

iddev5 commented Apr 26, 2021

Just tried it... Thanks a lot 🙏

@iddev5 iddev5 closed this as completed Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants