Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 0 additions & 6 deletions inst/include/bigmemory/util.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef BIGMEMORY_UTIL_HPP
#define BIGMEMORY_UTIL_HPP

#include <Rcpp.h>

#include "bigmemoryDefines.h"

using namespace std;
Expand Down Expand Up @@ -38,9 +36,6 @@ SEXP StringVec2RChar( const vector<string> &strVec,
}
*/

#undef length
#include <Rcpp.h>

template<typename T>
struct NewVec;

Expand Down Expand Up @@ -79,5 +74,4 @@ template<>
struct VecPtr<double>
{double* operator()(SEXP vec) const {return NUMERIC_DATA(vec);};};

#define length(x) Rf_length(x)
#endif // BIGMEMORY_UTIL_HPP
9 changes: 8 additions & 1 deletion src/bigmemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@

#include "bigmemory/BigMatrix.h"
#include "bigmemory/MatrixAccessor.hpp"
#include "bigmemory/util.h"
#include "bigmemory/isna.hpp"

// undefine length which Rcpp maps to Rf_length and uses as member function
#undef length
#include <Rcpp.h>
// but redefine it to Rf_length for subsequent use below and in util.h
#define length Rf_length

#include "bigmemory/util.h"

/* Notes
* R does not natively contain float type objects
* Therefore, every time you pass object to see they will initially be
Expand Down
12 changes: 5 additions & 7 deletions src/deepcopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@

#include "bigmemory/BigMatrix.h"
#include "bigmemory/MatrixAccessor.hpp"
#include "bigmemory/util.h"
#include "bigmemory/isna.hpp"

#include <stdio.h>
#include <R.h>
#include <Rinternals.h>
#include <Rdefines.h>
#include <stdlib.h>
#include <sys/types.h>
// undefine length which Rcpp maps to Rf_length and uses as member function
#undef length
#include <Rcpp.h>
// but redefine it to Rf_length for subsequent use below and in util.h
#define length Rf_length


template<typename in_CType, typename in_BMAccessorType,
Expand Down