diff --git a/src/altrep-sparse-real.c b/src/altrep-sparse-real.c index 3085b78..0091baf 100644 --- a/src/altrep-sparse-real.c +++ b/src/altrep-sparse-real.c @@ -2,7 +2,7 @@ #include #include -#include "altrep-sparse-utils.h" +#include "sparse-utils.h" // Initialised at load time R_altrep_class_t altrep_sparse_real_class; diff --git a/src/init.c b/src/init.c index fe9b302..2cc9caa 100644 --- a/src/init.c +++ b/src/init.c @@ -1,6 +1,6 @@ #include -#include "altrep-sparse-extractors.h" -#include "altrep-sparse-utils.h" +#include "sparse-extractors.h" +#include "sparse-utils.h" // Defined in altrep-sparse-real.c extern SEXP ffi_altrep_new_sparse_real(SEXP); @@ -11,8 +11,7 @@ static const R_CallMethodDef CallEntries[] = { {"ffi_altrep_sparse_positions", (DL_FUNC) &ffi_altrep_sparse_positions, 1}, {"ffi_altrep_sparse_values", (DL_FUNC) &ffi_altrep_sparse_values, 1}, {"ffi_extract_altrep_class", (DL_FUNC) &ffi_extract_altrep_class, 1}, - {NULL, NULL, 0} -}; + {NULL, NULL, 0}}; void R_init_sparsevctrs(DllInfo* dll) { R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); diff --git a/src/altrep-sparse-extractors.c b/src/sparse-extractors.c similarity index 65% rename from src/altrep-sparse-extractors.c rename to src/sparse-extractors.c index d47cf87..deb49ec 100644 --- a/src/altrep-sparse-extractors.c +++ b/src/sparse-extractors.c @@ -1,7 +1,4 @@ -#define R_NO_REMAP -#include -#include -#include "altrep-sparse-utils.h" +#include "sparse-extractors.h" SEXP ffi_altrep_sparse_positions(SEXP x) { SEXP out = extract_pos(x); diff --git a/src/altrep-sparse-extractors.h b/src/sparse-extractors.h similarity index 81% rename from src/altrep-sparse-extractors.h rename to src/sparse-extractors.h index 3b8e59b..5538009 100644 --- a/src/altrep-sparse-extractors.h +++ b/src/sparse-extractors.h @@ -1,7 +1,9 @@ #ifndef SPARSEVCTRS_SPARSE_EXTRACTORS_H #define SPARSEVCTRS_SPARSE_EXTRACTORS_H +#define R_NO_REMAP #include +#include "sparse-utils.h" SEXP ffi_altrep_sparse_positions(SEXP x); diff --git a/src/altrep-sparse-utils.c b/src/sparse-utils.c similarity index 98% rename from src/altrep-sparse-utils.c rename to src/sparse-utils.c index 8ada574..ab2dd6f 100644 --- a/src/altrep-sparse-utils.c +++ b/src/sparse-utils.c @@ -1,4 +1,4 @@ -#include "altrep-sparse-utils.h" +#include "sparse-utils.h" SEXP extract_val(SEXP x) { SEXP data1 = R_altrep_data1(x); diff --git a/src/altrep-sparse-utils.h b/src/sparse-utils.h similarity index 100% rename from src/altrep-sparse-utils.h rename to src/sparse-utils.h