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
25//
36// This file is part of Rcpp.
47//
2326// the idea is that this file should be generated automatically by Rcpp::register
2427
2528namespace Rcpp {
26- const char * type2name (SEXP x) ;
29+ const char * type2name (SEXP x);
2730
2831 namespace internal {
2932 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 ();
3336 }
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 );
3639}
3740
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);
4447SEXP 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);
4649void set_string_elt (SEXP s, int i, SEXP v);
4750void 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);
5053void set_vector_elt (SEXP v, int i, SEXP x);
5154SEXP* 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 ();
5962
6063#else
6164namespace Rcpp {
6265
6366 #define GET_CALLABLE (__FUN__ ) (Fun) R_GetCCallable( " Rcpp" , __FUN__ )
6467
6568 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);
6972 }
7073
7174 namespace internal {
7275 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 ();
7679 }
7780
7881 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 ();
8285 }
8386
8487 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" );
8790 return fun ();
8891 }
8992
9093 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" );
9396 return fun ();
9497 }
9598
9699 }
97100
98101
99102 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" );
102105 return fun (tm);
103106 }
104107
105108 inline struct tm * gmtime_ (const time_t * const x){
106109 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);
109112 }
110113
111114}
@@ -115,127 +118,127 @@ namespace Rcpp {
115118// by the compiler and otherwise '__attribute__ ((visibility ("hidden")))'
116119
117120inline 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 ();
121124}
122125
123126inline 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);
127130}
128131
129132inline 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);
133136}
134137
135138inline 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);
139142}
140143inline 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);
144147}
145148
146149inline 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);
150153}
151154
152155inline 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" );
155158 return fun (s, i);
156159}
157160
158161inline 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);
162165}
163166
164167inline 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 );
168171}
169172
170173inline 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);
174177}
175178
176179inline attribute_hidden SEXP get_vector_elt (SEXP v, int i){
177180 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);
180183}
181184
182185inline 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);
186189}
187190
188191inline 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);
192195}
193196
194197inline 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);
198201}
199202
200203inline 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);
204207}
205208
206209inline 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" );
209212 return fun ();
210213}
211214
212215inline 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);
216219}
217220
218221inline 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);
222225}
223226
224227inline 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 ();
228231}
229232
230233inline 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 ();
234237}
235238inline 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 ();
239242}
240243#endif
241244
0 commit comments