1
- // Copyright (C) 2013 Romain Francois
1
+ // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2
+ //
3
+ // Copyright (C) 2013 Romain Francois
4
+ // Copyright (C) 2015 Dirk Eddelbuettel
2
5
//
3
6
// This file is part of Rcpp.
4
7
//
23
26
// the idea is that this file should be generated automatically by Rcpp::register
24
27
25
28
namespace Rcpp {
26
- const char * type2name (SEXP x) ;
29
+ const char * type2name (SEXP x);
27
30
28
31
namespace internal {
29
32
unsigned long enterRNGScope ();
30
- unsigned long exitRNGScope () ;
31
- char * get_string_buffer () ;
32
- SEXP get_Rcpp_namespace () ;
33
+ unsigned long exitRNGScope ();
34
+ char * get_string_buffer ();
35
+ SEXP get_Rcpp_namespace ();
33
36
}
34
- double mktime00 (struct tm &) ;
35
- struct tm * gmtime_ (const time_t * const ) ;
37
+ double mktime00 (struct tm &);
38
+ struct tm * gmtime_ (const time_t * const );
36
39
}
37
40
38
- SEXP rcpp_get_stack_trace () ;
39
- SEXP rcpp_set_stack_trace (SEXP) ;
40
- std::string demangle ( const std::string& name) ;
41
- const char * short_file_name (const char * ) ;
42
- int * get_cache ( int n ) ;
43
- SEXP stack_trace ( const char *file, int line) ;
41
+ SEXP rcpp_get_stack_trace ();
42
+ SEXP rcpp_set_stack_trace (SEXP);
43
+ std::string demangle ( const std::string& name);
44
+ const char * short_file_name (const char * );
45
+ int * get_cache ( int n );
46
+ SEXP stack_trace ( const char *file, int line);
44
47
SEXP get_string_elt (SEXP s, int i);
45
- const char * char_get_string_elt (SEXP s, int i) ;
48
+ const char * char_get_string_elt (SEXP s, int i);
46
49
void set_string_elt (SEXP s, int i, SEXP v);
47
50
void char_set_string_elt (SEXP s, int i, const char * v);
48
- SEXP* get_string_ptr (SEXP s) ;
49
- SEXP get_vector_elt (SEXP v, int i) ;
51
+ SEXP* get_string_ptr (SEXP s);
52
+ SEXP get_vector_elt (SEXP v, int i);
50
53
void set_vector_elt (SEXP v, int i, SEXP x);
51
54
SEXP* get_vector_ptr (SEXP v);
52
- const char * char_nocheck ( SEXP x) ;
53
- void * dataptr (SEXP x) ;
54
- Rcpp::Module* getCurrentScope () ;
55
- void setCurrentScope ( Rcpp::Module* mod ) ;
56
- SEXP reset_current_error () ;
57
- int error_occured () ;
58
- SEXP rcpp_get_current_error () ;
55
+ const char * char_nocheck ( SEXP x);
56
+ void * dataptr (SEXP x);
57
+ Rcpp::Module* getCurrentScope ();
58
+ void setCurrentScope ( Rcpp::Module* mod );
59
+ SEXP reset_current_error ();
60
+ int error_occured ();
61
+ SEXP rcpp_get_current_error ();
59
62
60
63
#else
61
64
namespace Rcpp {
62
65
63
66
#define GET_CALLABLE (__FUN__ ) (Fun) R_GetCCallable( " Rcpp" , __FUN__ )
64
67
65
68
inline const char * type2name (SEXP x){
66
- typedef const char * (*Fun)(SEXP) ;
67
- static Fun fun = GET_CALLABLE (" type2name" ) ;
68
- return fun (x) ;
69
+ typedef const char * (*Fun)(SEXP);
70
+ static Fun fun = GET_CALLABLE (" type2name" );
71
+ return fun (x);
69
72
}
70
73
71
74
namespace internal {
72
75
inline unsigned long enterRNGScope (){
73
- typedef unsigned long (*Fun)(void ) ;
74
- static Fun fun = GET_CALLABLE (" enterRNGScope" ) ;
75
- return fun () ;
76
+ typedef unsigned long (*Fun)(void );
77
+ static Fun fun = GET_CALLABLE (" enterRNGScope" );
78
+ return fun ();
76
79
}
77
80
78
81
inline unsigned long exitRNGScope (){
79
- typedef unsigned long (*Fun)(void ) ;
80
- static Fun fun = GET_CALLABLE (" exitRNGScope" ) ;
81
- return fun () ;
82
+ typedef unsigned long (*Fun)(void );
83
+ static Fun fun = GET_CALLABLE (" exitRNGScope" );
84
+ return fun ();
82
85
}
83
86
84
87
inline char * get_string_buffer (){
85
- typedef char * (*Fun)(void ) ;
86
- static Fun fun = GET_CALLABLE (" get_string_buffer" ) ;
88
+ typedef char * (*Fun)(void );
89
+ static Fun fun = GET_CALLABLE (" get_string_buffer" );
87
90
return fun ();
88
91
}
89
92
90
93
inline SEXP get_Rcpp_namespace () {
91
- typedef SEXP (*Fun)(void ) ;
92
- static Fun fun = GET_CALLABLE (" get_Rcpp_namespace" ) ;
94
+ typedef SEXP (*Fun)(void );
95
+ static Fun fun = GET_CALLABLE (" get_Rcpp_namespace" );
93
96
return fun ();
94
97
}
95
98
96
99
}
97
100
98
101
99
102
inline double mktime00 (struct tm &tm){
100
- typedef double (*Fun)(struct tm &) ;
101
- static Fun fun = GET_CALLABLE (" mktime00" ) ;
103
+ typedef double (*Fun)(struct tm &);
104
+ static Fun fun = GET_CALLABLE (" mktime00" );
102
105
return fun (tm);
103
106
}
104
107
105
108
inline struct tm * gmtime_ (const time_t * const x){
106
109
typedef struct tm * (*Fun)(const time_t * const );
107
- static Fun fun = GET_CALLABLE (" gmtime_" ) ;
108
- return fun (x) ;
110
+ static Fun fun = GET_CALLABLE (" gmtime_" );
111
+ return fun (x);
109
112
}
110
113
111
114
}
@@ -115,127 +118,127 @@ namespace Rcpp {
115
118
// by the compiler and otherwise '__attribute__ ((visibility ("hidden")))'
116
119
117
120
inline attribute_hidden SEXP rcpp_get_stack_trace (){
118
- typedef SEXP (*Fun)(void ) ;
119
- static Fun fun = GET_CALLABLE (" rcpp_get_stack_trace" ) ;
120
- return fun () ;
121
+ typedef SEXP (*Fun)(void );
122
+ static Fun fun = GET_CALLABLE (" rcpp_get_stack_trace" );
123
+ return fun ();
121
124
}
122
125
123
126
inline attribute_hidden SEXP rcpp_set_stack_trace (SEXP e){
124
- typedef SEXP (*Fun)(SEXP) ;
125
- static Fun fun = GET_CALLABLE (" rcpp_set_stack_trace" ) ;
126
- return fun (e) ;
127
+ typedef SEXP (*Fun)(SEXP);
128
+ static Fun fun = GET_CALLABLE (" rcpp_set_stack_trace" );
129
+ return fun (e);
127
130
}
128
131
129
132
inline attribute_hidden std::string demangle ( const std::string& name){
130
- typedef std::string (*Fun)( const std::string& ) ;
131
- static Fun fun = GET_CALLABLE (" demangle" ) ;
132
- return fun (name) ;
133
+ typedef std::string (*Fun)( const std::string& );
134
+ static Fun fun = GET_CALLABLE (" demangle" );
135
+ return fun (name);
133
136
}
134
137
135
138
inline attribute_hidden const char * short_file_name (const char * file) {
136
- typedef const char * (*Fun)(const char *) ;
137
- static Fun fun = GET_CALLABLE (" short_file_name" ) ;
138
- return fun (file) ;
139
+ typedef const char * (*Fun)(const char *);
140
+ static Fun fun = GET_CALLABLE (" short_file_name" );
141
+ return fun (file);
139
142
}
140
143
inline attribute_hidden SEXP stack_trace ( const char *file, int line){
141
- typedef SEXP (*Fun)(const char *, int ) ;
142
- static Fun fun = GET_CALLABLE (" stack_trace" ) ;
143
- return fun (file, line) ;
144
+ typedef SEXP (*Fun)(const char *, int );
145
+ static Fun fun = GET_CALLABLE (" stack_trace" );
146
+ return fun (file, line);
144
147
}
145
148
146
149
inline attribute_hidden SEXP get_string_elt (SEXP s, int i){
147
- typedef SEXP (*Fun)(SEXP, int ) ;
148
- static Fun fun = GET_CALLABLE (" get_string_elt" ) ;
149
- return fun (s, i) ;
150
+ typedef SEXP (*Fun)(SEXP, int );
151
+ static Fun fun = GET_CALLABLE (" get_string_elt" );
152
+ return fun (s, i);
150
153
}
151
154
152
155
inline attribute_hidden const char * char_get_string_elt (SEXP s, int i){
153
- typedef const char * (*Fun)(SEXP, int ) ;
154
- static Fun fun = GET_CALLABLE (" char_get_string_elt" ) ;
156
+ typedef const char * (*Fun)(SEXP, int );
157
+ static Fun fun = GET_CALLABLE (" char_get_string_elt" );
155
158
return fun (s, i);
156
159
}
157
160
158
161
inline attribute_hidden void set_string_elt (SEXP s, int i, SEXP v){
159
- typedef void (*Fun)(SEXP,int ,SEXP) ;
160
- static Fun fun = GET_CALLABLE (" set_string_elt" ) ;
161
- fun (s, i, v) ;
162
+ typedef void (*Fun)(SEXP,int ,SEXP);
163
+ static Fun fun = GET_CALLABLE (" set_string_elt" );
164
+ fun (s, i, v);
162
165
}
163
166
164
167
inline attribute_hidden void char_set_string_elt (SEXP s, int i, const char * v){
165
- typedef void (*Fun)(SEXP,int , const char *) ;
166
- static Fun fun = GET_CALLABLE (" char_set_string_elt" ) ;
167
- fun (s, i, v ) ;
168
+ typedef void (*Fun)(SEXP,int , const char *);
169
+ static Fun fun = GET_CALLABLE (" char_set_string_elt" );
170
+ fun (s, i, v );
168
171
}
169
172
170
173
inline attribute_hidden SEXP* get_string_ptr (SEXP s){
171
- typedef SEXP* (*Fun)(SEXP) ;
172
- static Fun fun = GET_CALLABLE (" get_string_ptr" ) ;
173
- return fun (s) ;
174
+ typedef SEXP* (*Fun)(SEXP);
175
+ static Fun fun = GET_CALLABLE (" get_string_ptr" );
176
+ return fun (s);
174
177
}
175
178
176
179
inline attribute_hidden SEXP get_vector_elt (SEXP v, int i){
177
180
typedef SEXP (*Fun)(SEXP, int );
178
- static Fun fun = GET_CALLABLE (" get_vector_elt" ) ;
179
- return fun (v, i) ;
181
+ static Fun fun = GET_CALLABLE (" get_vector_elt" );
182
+ return fun (v, i);
180
183
}
181
184
182
185
inline attribute_hidden void set_vector_elt (SEXP v, int i, SEXP x){
183
- typedef void (*Fun)(SEXP, int , SEXP) ;
184
- static Fun fun = GET_CALLABLE (" set_vector_elt" ) ;
185
- fun (v, i, x) ;
186
+ typedef void (*Fun)(SEXP, int , SEXP);
187
+ static Fun fun = GET_CALLABLE (" set_vector_elt" );
188
+ fun (v, i, x);
186
189
}
187
190
188
191
inline attribute_hidden SEXP* get_vector_ptr (SEXP v){
189
- typedef SEXP* (*Fun)(SEXP) ;
190
- static Fun fun = GET_CALLABLE (" get_vector_ptr" ) ;
191
- return fun (v) ;
192
+ typedef SEXP* (*Fun)(SEXP);
193
+ static Fun fun = GET_CALLABLE (" get_vector_ptr" );
194
+ return fun (v);
192
195
}
193
196
194
197
inline attribute_hidden const char * char_nocheck ( SEXP x){
195
- typedef const char * (*Fun)(SEXP) ;
196
- static Fun fun = GET_CALLABLE (" char_nocheck" ) ;
197
- return fun (x) ;
198
+ typedef const char * (*Fun)(SEXP);
199
+ static Fun fun = GET_CALLABLE (" char_nocheck" );
200
+ return fun (x);
198
201
}
199
202
200
203
inline attribute_hidden void * dataptr (SEXP x){
201
- typedef void * (*Fun)(SEXP) ;
202
- static Fun fun = GET_CALLABLE (" dataptr" ) ;
203
- return fun (x) ;
204
+ typedef void * (*Fun)(SEXP);
205
+ static Fun fun = GET_CALLABLE (" dataptr" );
206
+ return fun (x);
204
207
}
205
208
206
209
inline attribute_hidden Rcpp::Module* getCurrentScope (){
207
- typedef Rcpp::Module* (*Fun)(void ) ;
208
- static Fun fun = GET_CALLABLE (" getCurrentScope" ) ;
210
+ typedef Rcpp::Module* (*Fun)(void );
211
+ static Fun fun = GET_CALLABLE (" getCurrentScope" );
209
212
return fun ();
210
213
}
211
214
212
215
inline attribute_hidden void setCurrentScope ( Rcpp::Module* mod ){
213
- typedef void (*Fun)(Rcpp::Module*) ;
214
- static Fun fun = GET_CALLABLE (" setCurrentScope" ) ;
215
- fun (mod) ;
216
+ typedef void (*Fun)(Rcpp::Module*);
217
+ static Fun fun = GET_CALLABLE (" setCurrentScope" );
218
+ fun (mod);
216
219
}
217
220
218
221
inline attribute_hidden int * get_cache ( int n ){
219
- typedef int * (*Fun)(int ) ;
220
- static Fun fun = GET_CALLABLE (" get_cache" ) ;
221
- return fun (n) ;
222
+ typedef int * (*Fun)(int );
223
+ static Fun fun = GET_CALLABLE (" get_cache" );
224
+ return fun (n);
222
225
}
223
226
224
227
inline attribute_hidden SEXP reset_current_error (){
225
- typedef SEXP (*Fun)(void ) ;
226
- static Fun fun = GET_CALLABLE (" reset_current_error" ) ;
227
- return fun () ;
228
+ typedef SEXP (*Fun)(void );
229
+ static Fun fun = GET_CALLABLE (" reset_current_error" );
230
+ return fun ();
228
231
}
229
232
230
233
inline attribute_hidden int error_occured (){
231
- typedef int (*Fun)(void ) ;
232
- static Fun fun = GET_CALLABLE (" error_occured" ) ;
233
- return fun () ;
234
+ typedef int (*Fun)(void );
235
+ static Fun fun = GET_CALLABLE (" error_occured" );
236
+ return fun ();
234
237
}
235
238
inline attribute_hidden SEXP rcpp_get_current_error (){
236
- typedef SEXP (*Fun)(void ) ;
237
- static Fun fun = GET_CALLABLE (" rcpp_get_current_error" ) ;
238
- return fun () ;
239
+ typedef SEXP (*Fun)(void );
240
+ static Fun fun = GET_CALLABLE (" rcpp_get_current_error" );
241
+ return fun ();
239
242
}
240
243
#endif
241
244
0 commit comments