diff options
author | Yusuke Endoh <[email protected]> | 2019-09-22 22:12:18 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-22 22:12:18 +0900 |
commit | 5f35b8ca30cba69968d4d0c885a4bf5c48b03e17 (patch) | |
tree | c8388a0b0dc8790b906ebc5bc90660eccaf4f980 /include/ruby/intern.h | |
parent | 2272efa4632a845ead37377a22ad9e24b45ebf27 (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
Notes:
Merged-By: mame <[email protected]>
Diffstat (limited to 'include/ruby/intern.h')
-rw-r--r-- | include/ruby/intern.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h index caeccca22f..dc9abbf52b 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -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); +void rb_st_foreach_safe(struct st_table *, int (*)(st_data_t, st_data_t, st_data_t), st_data_t); +#define st_foreach_safe rb_st_foreach_safe VALUE rb_check_hash_type(VALUE); void rb_hash_foreach(VALUE, int (*)(VALUE, VALUE, VALUE), VALUE); VALUE rb_hash(VALUE); |