2
2
//
3
3
// RcppCommon.h: Rcpp R/C++ interface class library -- common include and defines statements
4
4
//
5
- // Copyright (C) 2008 - 2009 Dirk Eddelbuettel
6
- // Copyright (C) 2009 - 2013 Dirk Eddelbuettel and Romain Francois
5
+ // Copyright (C) 2008 - 2009 Dirk Eddelbuettel
6
+ // Copyright (C) 2009 - 2015 Dirk Eddelbuettel and Romain Francois
7
7
//
8
8
// This file is part of Rcpp.
9
9
//
31
31
/* *
32
32
* \brief Rcpp API
33
33
*/
34
- namespace Rcpp {
34
+ namespace Rcpp {
35
35
36
36
/* *
37
37
* \brief traits used to dispatch wrap
38
38
*/
39
- namespace traits {
39
+ namespace traits {
40
40
} // traits
41
41
42
42
/* *
43
43
* \brief internal implementation details
44
44
*/
45
- namespace internal {
45
+ namespace internal {
46
46
} // internal
47
47
} // Rcpp
48
48
@@ -71,33 +71,33 @@ namespace Rcpp{
71
71
#include < Rmath.h>
72
72
#include < Rcpp/sugar/undoRmath.h>
73
73
74
- namespace Rcpp {
74
+ namespace Rcpp {
75
75
76
- SEXP Rcpp_eval (SEXP expr_, SEXP env = R_GlobalEnv ) ;
77
- class Module ;
76
+ SEXP Rcpp_eval (SEXP expr_, SEXP env = R_GlobalEnv) ;
77
+ class Module ;
78
78
79
- namespace traits {
80
- template <typename T> class named_object ;
79
+ namespace traits {
80
+ template <typename T> class named_object ;
81
81
}
82
82
83
- inline SEXP Rcpp_PreserveObject (SEXP x){
84
- if ( x != R_NilValue ) {
83
+ inline SEXP Rcpp_PreserveObject (SEXP x) {
84
+ if ( x != R_NilValue) {
85
85
R_PreserveObject (x);
86
86
}
87
- return x ;
87
+ return x;
88
88
}
89
89
90
- inline void Rcpp_ReleaseObject (SEXP x){
90
+ inline void Rcpp_ReleaseObject (SEXP x) {
91
91
if (x != R_NilValue) {
92
92
R_ReleaseObject (x);
93
93
}
94
94
}
95
95
96
- inline SEXP Rcpp_ReplaceObject (SEXP x, SEXP y){
97
- if ( Rf_isNull (x) ) {
98
- Rcpp_PreserveObject ( y ) ;
99
- } else if ( Rf_isNull (y) ) {
100
- Rcpp_ReleaseObject ( x ) ;
96
+ inline SEXP Rcpp_ReplaceObject (SEXP x, SEXP y) {
97
+ if ( Rf_isNull (x)) {
98
+ Rcpp_PreserveObject (y) ;
99
+ } else if ( Rf_isNull (y)) {
100
+ Rcpp_ReleaseObject (x) ;
101
101
} else {
102
102
// if we are setting to the same SEXP as we already have, do nothing
103
103
if (x != y) {
@@ -110,7 +110,7 @@ namespace Rcpp{
110
110
111
111
}
112
112
}
113
- return y ;
113
+ return y;
114
114
}
115
115
116
116
}
@@ -131,12 +131,12 @@ namespace Rcpp{
131
131
132
132
#include < Rcpp/Interrupt.h>
133
133
134
- namespace Rcpp {
135
- template <typename T> class object ;
136
- class String ;
137
- namespace internal {
138
- template <typename Class> SEXP make_new_object ( Class* ptr ) ;
139
- }
134
+ namespace Rcpp {
135
+ template <typename T> class object ;
136
+ class String ;
137
+ namespace internal {
138
+ template <typename Class> SEXP make_new_object (Class* ptr) ;
139
+ }
140
140
}
141
141
142
142
#include < Rcpp/longlong.h>
0 commit comments