-
Notifications
You must be signed in to change notification settings - Fork 549
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
Helper functions for khash (patch available) #105
Comments
this sounds useful. would you mind sharing your patch, @krivit ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been using
klib
'skhash
for my own project, and I've written some convenience functions. I was wondering if there might be interest in incorporating them into the core implementation:kh_getval(name, h, key, defval)
: Return the value corresponding to keykey
, ordefval
if the key is not found.kh_set(name, h, key, val)
: Set the value corresponding to keykey
toval
, inserting into table ifkey
is absent and overwriting if present.kh_unset(name, h, key)
: A more user-friendlykh_del()
: checks ifkey
is in the table, and deletes if it is.I would be happy to submit a pull request incorporating these.
The text was updated successfully, but these errors were encountered: