Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-package] remove xlen_t in custom R-to-C++ interface #3223

Merged
merged 1 commit into from
Jul 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions R-package/src/R_object_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@

#include <cstdint>

// use .Internal(internalsID()) to uuid
#define R_INTERNALS_UUID "2fdf6c18-697a-4ba7-b8ef-11c0d92f1327"
#define R_NO_REMAP
#define R_USE_C99_IN_CXX
#include <Rinternals.h>

#define NAMED_BITS 16
struct lgbm_sxpinfo {
Expand All @@ -35,13 +36,6 @@ struct lgbm_sxpinfo {
unsigned int extra : 32 - NAMED_BITS;
};

// 64bit pointer
#if INTPTR_MAX == INT64_MAX
typedef int64_t xlen_t;
#else
typedef int xlen_t;
#endif

struct lgbm_primsxp {
int offset;
};
Expand Down Expand Up @@ -91,8 +85,8 @@ typedef struct LGBM_SER {
} LGBM_SER, *LGBM_SE;

struct lgbm_vecsxp {
xlen_t length;
xlen_t truelength;
R_xlen_t length;
R_xlen_t truelength;
};

typedef struct VECTOR_SER {
Expand Down