You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using %ld for R_xlen_t doesn't give the desired result when the number is 2^31 or more for 64-bit R on Windows. On Windows, long is 32-bit.
Instances:
function 'do_psort' in sort.c
Example usage in R:
res <- sort(integer(2^31), partial = 2^31+1)
function 'inspect_tree' in inspect.c
Example usage in R:
.Internal(inspect(raw(2^31)))
For 32-bit R, in Rinternals.h, R_xlen_t is int and %d can be used.
For 64-bit R, in Rinternals.h, R_xlen_t is ptrdiff_t and %td can be used. Is it available everywhere?
This is a follow-up of Bug 17292 Comment 7.
Using %ld for R_xlen_t doesn't give the desired result when the number is 2^31 or more for 64-bit R on Windows. On Windows, long is 32-bit.
Instances:
function 'do_psort' in sort.c
Example usage in R:
res <- sort(integer(2^31), partial = 2^31+1)
function 'inspect_tree' in inspect.c
Example usage in R:
.Internal(inspect(raw(2^31)))
For 32-bit R, in Rinternals.h, R_xlen_t is int and %d can be used.
For 64-bit R, in Rinternals.h, R_xlen_t is ptrdiff_t and %td can be used. Is it available everywhere?
METADATA
The text was updated successfully, but these errors were encountered: