8317730: Change byte_size to return size_t
Reviewed-by: coleenp, kbarrett
This commit is contained in:
parent
c2abf120bc
commit
fb4098ff1a
@ -1138,8 +1138,8 @@ static inline julong uabs(jlong n) { return uabs((julong)n); }
|
|||||||
static inline unsigned int uabs(int n) { return uabs((unsigned int)n); }
|
static inline unsigned int uabs(int n) { return uabs((unsigned int)n); }
|
||||||
|
|
||||||
// "to" should be greater than "from."
|
// "to" should be greater than "from."
|
||||||
inline intx byte_size(void* from, void* to) {
|
inline size_t byte_size(void* from, void* to) {
|
||||||
return (address)to - (address)from;
|
return pointer_delta(to, from, sizeof(char));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pack and extract shorts to/from ints:
|
// Pack and extract shorts to/from ints:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user