Use ruby functions if RUBY is defined

This commit is contained in:
Nobuyoshi Nakada 2023-06-17 11:30:23 +09:00
parent 9001d54788
commit ba0bcc5203
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6
Notes: git 2023-06-17 06:45:24 +00:00

2
st.c
View File

@ -342,7 +342,7 @@ get_power2(st_index_t size)
unsigned int n = ST_INDEX_BITS - nlz_intptr(size);
if (n <= MAX_POWER2)
return n < MINIMAL_POWER2 ? MINIMAL_POWER2 : n;
#ifndef NOT_RUBY
#ifdef RUBY
/* Ran out of the table entries */
rb_raise(rb_eRuntimeError, "st_table too big");
#endif