Project

General

Profile

Feature #15631 » st.c.patch

ahorek (Pavel Rosický), 07/19/2019 03:15 PM

View differences:

st.c (working copy)
static int
get_power2(st_index_t size)
{
unsigned int n;
for (n = 0; size != 0; n++)
size >>= 1;
unsigned int n = (SIZEOF_INT * CHAR_BIT) - nlz_int((unsigned int)size);
if (n <= MAX_POWER2)
return n < MINIMAL_POWER2 ? MINIMAL_POWER2 : n;
#ifndef NOT_RUBY
(2-2/3)