Skip to content

Commit

Permalink
Merge pull request #30 from EmilHvitfeldt/file-reorder
Browse files Browse the repository at this point in the history
rename c files
  • Loading branch information
EmilHvitfeldt authored May 6, 2024
2 parents 199ea2a + 1c2fc6a commit 6657162
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/altrep-sparse-real.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <Rinternals.h>
#include <R_ext/Altrep.h>

#include "altrep-sparse-utils.h"
#include "sparse-utils.h"

// Initialised at load time
R_altrep_class_t altrep_sparse_real_class;
Expand Down
7 changes: 3 additions & 4 deletions src/init.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <Rinternals.h>
#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);
Expand All @@ -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);
Expand Down
5 changes: 1 addition & 4 deletions src/altrep-sparse-extractors.c → src/sparse-extractors.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#define R_NO_REMAP
#include <R.h>
#include <Rinternals.h>
#include "altrep-sparse-utils.h"
#include "sparse-extractors.h"

SEXP ffi_altrep_sparse_positions(SEXP x) {
SEXP out = extract_pos(x);
Expand Down
2 changes: 2 additions & 0 deletions src/altrep-sparse-extractors.h → src/sparse-extractors.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef SPARSEVCTRS_SPARSE_EXTRACTORS_H
#define SPARSEVCTRS_SPARSE_EXTRACTORS_H

#define R_NO_REMAP
#include <Rinternals.h>
#include "sparse-utils.h"

SEXP ffi_altrep_sparse_positions(SEXP x);

Expand Down
2 changes: 1 addition & 1 deletion src/altrep-sparse-utils.c → src/sparse-utils.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "altrep-sparse-utils.h"
#include "sparse-utils.h"

SEXP extract_val(SEXP x) {
SEXP data1 = R_altrep_data1(x);
Expand Down
File renamed without changes.

0 comments on commit 6657162

Please sign in to comment.