path: root/include
diff options
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-06 15:11:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-06 15:11:53 +0000
commit783b3c8d5a32f086d435a7f7ecf02d270fa8e133 (patch)
treeab53c78dd9ede690702b670a15c7d7ad681c6825 /include
parentea74da0c6c71edf8025ff67fbf445251d512acf1 (diff)
st.c: remove equality checks
* st.c (st_update): remove equality checks, callers should ensure the equality, otherwise the behavior is undefined. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ruby/st.h b/include/ruby/st.h
index 975da65..0ef4999 100644
--- a/include/ruby/st.h
+++ b/include/ruby/st.h
@@ -115,6 +115,9 @@ int st_insert2(st_table *, st_data_t, st_data_t, st_data_t (*)(st_data_t));
int st_lookup(st_table *, st_data_t, st_data_t *);
int st_get_key(st_table *, st_data_t, st_data_t *);
typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing);
+/* *key may be altered, but must equal to the old key, i.e., the
+ * results of hash() are same and compare() returns 0, otherwise the
+ * behavior is undefined */
int st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg);
int st_foreach(st_table *, int (*)(ANYARGS), st_data_t);
int st_foreach_check(st_table *, int (*)(ANYARGS), st_data_t, st_data_t);