summaryrefslogtreecommitdiff
path: root/include/ruby/intern.h
diff options
context:
space:
mode:
authorYusuke Endoh <[email protected]>2019-09-22 22:12:18 +0900
committer<[email protected]>2019-09-22 22:12:18 +0900
commit5f35b8ca30cba69968d4d0c885a4bf5c48b03e17 ()
treec8388a0b0dc8790b906ebc5bc90660eccaf4f980 /include/ruby/intern.h
parent2272efa4632a845ead37377a22ad9e24b45ebf27 (diff)
st.c: Use rb_st_* prefix instead of st_* (#2479)
The original st.c was public domain hash table implementation, but Ruby's st.c is highly modified, and its data structure is not compatiblie with the original one. Therefore, when creating an extension library to wrap C code that uses the original st.c, the symbols conflict, which leads to segfault. This changes the prefix `st_*` of st.c functions to `rb_st_*` for reflecting that they are specific to Ruby's, and avoid symbol conflicts.
Notes: Merged-By: mame <[email protected]>
-rw-r--r--include/ruby/intern.h3
1 files changed, 2 insertions, 1 deletions
@@ -534,7 +534,8 @@ size_t rb_gc_stat(VALUE);
VALUE rb_gc_latest_gc_info(VALUE);
void rb_gc_adjust_memory_usage(ssize_t);
/* hash.c */
-void st_foreach_safe(struct st_table *, int (*)(st_data_t, st_data_t, st_data_t), st_data_t);
VALUE rb_check_hash_type(VALUE);
void rb_hash_foreach(VALUE, int (*)(VALUE, VALUE, VALUE), VALUE);
VALUE rb_hash(VALUE);