From 3aabbb466734d97d44a5335e7ddba04709cbdc72 Mon Sep 17 00:00:00 2001 From: "Matthew L. Fidler" Date: Tue, 13 Aug 2024 19:36:17 -0500 Subject: [PATCH] Use R_ExternalPtrAddrFn --- src/PreciseSumsPtr.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PreciseSumsPtr.h b/src/PreciseSumsPtr.h index c6d3f97..56da7d1 100644 --- a/src/PreciseSumsPtr.h +++ b/src/PreciseSumsPtr.h @@ -41,12 +41,12 @@ extern "C" { static inline void iniPreciseSumsPtr0(SEXP ptrLst) { if (PreciseSums_sum == NULL) { - PreciseSums_sum = (PreciseSums_sum_type) R_ExternalPtrAddr(VECTOR_ELT(ptrLst, 0)); - PreciseSums_prod = (PreciseSums_prod_type) R_ExternalPtrAddr(VECTOR_ELT(ptrLst, 1)); - PreciseSums_sum_r = (PreciseSums_sum_r_type) R_ExternalPtrAddr(VECTOR_ELT(ptrLst, 2)); - PreciseSums_prod_r = (PreciseSums_prod_r_type) R_ExternalPtrAddr(VECTOR_ELT(ptrLst, 3)); - PreciseSums_sum_get = (PreciseSums_sum_get_type) R_ExternalPtrAddr(VECTOR_ELT(ptrLst, 4)); - PreciseSums_prod_get = (PreciseSums_prod_get_type) R_ExternalPtrAddr(VECTOR_ELT(ptrLst, 5)); + PreciseSums_sum = (PreciseSums_sum_type) R_ExternalPtrAddrFn(VECTOR_ELT(ptrLst, 0)); + PreciseSums_prod = (PreciseSums_prod_type) R_ExternalPtrAddrFn(VECTOR_ELT(ptrLst, 1)); + PreciseSums_sum_r = (PreciseSums_sum_r_type) R_ExternalPtrAddrFn(VECTOR_ELT(ptrLst, 2)); + PreciseSums_prod_r = (PreciseSums_prod_r_type) R_ExternalPtrAddrFn(VECTOR_ELT(ptrLst, 3)); + PreciseSums_sum_get = (PreciseSums_sum_get_type) R_ExternalPtrAddrFn(VECTOR_ELT(ptrLst, 4)); + PreciseSums_prod_get = (PreciseSums_prod_get_type) R_ExternalPtrAddrFn(VECTOR_ELT(ptrLst, 5)); } } #define iniPreciseSums \