check_call!() macro to use () not []

(cherry picked from commit 66d255af0a5d331782dc24c89bb45d3434f3c109)
This commit is contained in:
Taeer Bar-Yam 2024-07-02 16:35:32 -04:00 committed by Robert Hensing
parent da26721bea
commit cc2e640e7f
5 changed files with 64 additions and 39 deletions

View file

@ -77,7 +77,7 @@ impl Clone for Value {
// this is very unlikely to error, and it is not recoverable
// Maybe try without, and try again with context to report details?
unsafe {
check_call!(raw::gc_incref[&mut Context::new(), self.inner.as_ptr()]).unwrap();
check_call!(raw::gc_incref(&mut Context::new(), self.inner.as_ptr())).unwrap();
}
// can't return an error here, but we don't want to ignore the error either as it means we could use-after-free
Value { inner: self.inner }