MemoryBlock and size_t params


Some MemoryBlock methods take size_t as parameter (getBitRange, setBitRange) yet they return int. This seems weird since, if you compile a program:

std::cout << "sizeof int == " << sizeof(int) << " sizeof size_t == " <<  sizeof(size_t) << std::endl;

the result is:

sizeof int == 4 sizeof size_t == 8


so the result might not fit into the return value (looks like size_t is 64bits)

Is this something i need to take care myslef ?


Not sure you're correctly understanding that... The type of the bit index and the type of the return value are complete unrelated (?)


I think i get it now, i was weirded out because that appeared recently and my luabind binding for JUCE wen crazy and stopped working (cast to int64 was not possible).

But i see that the size_t parameter is only for bit position and bit count not for actual values.


Sorry for that.