summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-09-22 22:12:18 +0900
committerGitHub <noreply@github.com>2019-09-22 22:12:18 +0900
commit5f35b8ca30cba69968d4d0c885a4bf5c48b03e17 (patch)
treec8388a0b0dc8790b906ebc5bc90660eccaf4f980 /st.c
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
Notes: Merged-By: mame <mame@ruby-lang.org>
Diffstat (limited to 'st.c')
-rw-r--r--st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/st.c b/st.c
index 891fe8d519..924a15d02f 100644
--- a/st.c
+++ b/st.c
@@ -2027,7 +2027,7 @@ st_hash_end(st_index_t h)
#undef st_hash_start
st_index_t
-st_hash_start(st_index_t h)
+rb_st_hash_start(st_index_t h)
{
return h;
}