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.
This commit is contained in:
Yusuke Endoh 2019-09-22 22:12:18 +09:00 committed by GitHub
parent 2272efa463
commit 5f35b8ca30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2019-09-22 22:12:41 +09:00
Merged-By: mame <mame@ruby-lang.org>
4 changed files with 81 additions and 43 deletions

2
st.c
View file

@ -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;
}