Skip to content

Commit

Permalink
Test balloon
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Nov 28, 2023
1 parent dca0094 commit 6dfcb92
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/r_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
#include <string>
#include <vector>

#ifdef R_VERSION
# if (R_VERSION >= R_Version(4, 4, 0))
# define R_PRIdXLEN_T "td"
# else
# define R_PRIdXLEN_T "d"
# endif
#else
# define R_PRIdXLEN_T "d"
#endif

namespace vroom {

inline std::string
Expand Down
8 changes: 5 additions & 3 deletions src/vroom_big_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
constexpr long long NA_INTEGER64 = 0x8000000000000000LL;

#include "vroom.h"
#include "r_utils.h"

namespace cpp11 {
inline bool is_na(long long x) { return x == NA_INTEGER64; }
Expand Down Expand Up @@ -56,9 +57,10 @@ class vroom_big_int : public vroom_vec {
static Rboolean
Inspect(SEXP x, int, int, int, void (*)(SEXP, int, int, int)) {
Rprintf(
"vroom_big_int (len=%d, materialized=%s)\n",
Length(x),
R_altrep_data2(x) != R_NilValue ? "T" : "F");
"vroom_big_int (len=%" R_PRIdXLEN_T ", materialized=%s)\n",
Length(x),
R_altrep_data2(x) != R_NilValue ? "T" : "F");

return TRUE;
}

Expand Down

0 comments on commit 6dfcb92

Please sign in to comment.