From e964a3a337c0be838dc65d5bbb7cb5ff1d0a7046 Mon Sep 17 00:00:00 2001 From: snek Date: Thu, 6 Mar 2025 20:04:27 +0100 Subject: [PATCH] fix: EstimateMemoryUsage returns size_t now (#1729) --- src/string.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/string.rs b/src/string.rs index 7ebcedfd..61a7000a 100644 --- a/src/string.rs +++ b/src/string.rs @@ -284,8 +284,8 @@ unsafe extern "C" fn one_byte_const_unaccount( } unsafe extern "C" fn one_byte_const_estimate_memory_usage( _this: *const OneByteConst, -) -> int { - -1 +) -> size_t { + usize::MAX // ExternalStringResource::kDefaultMemoryEstimate } unsafe extern "C" fn one_byte_const_estimate_shared_memory_usage( _this: *const OneByteConst, @@ -302,7 +302,7 @@ type OneByteConstLength = unsafe extern "C" fn(*const OneByteConst) -> usize; type OneByteConstUnaccount = unsafe extern "C" fn(*const OneByteConst, *mut Isolate); type OneByteConstEstimateMemoryUsage = - unsafe extern "C" fn(*const OneByteConst) -> int; + unsafe extern "C" fn(*const OneByteConst) -> size_t; type OneByteConstEstimateSharedMemoryUsage = unsafe extern "C" fn(*const OneByteConst, *mut ());