@@ -110,125 +110,129 @@ namespace Rcpp {
110
110
111
111
}
112
112
113
- inline SEXP rcpp_get_stack_trace (){
113
+ // The 'attribute_hidden' used here is a simple precessor defined from
114
+ // ${R_HOME}/include/R_ext/Visibility.h -- it is empty when not supported
115
+ // by the compiler and otherwise '__attribute__ ((visibility ("hidden")))'
116
+
117
+ inline attribute_hidden SEXP rcpp_get_stack_trace (){
114
118
typedef SEXP (*Fun)(void ) ;
115
119
static Fun fun = GET_CALLABLE (" rcpp_get_stack_trace" ) ;
116
120
return fun () ;
117
121
}
118
122
119
- inline SEXP rcpp_set_stack_trace (SEXP e){
123
+ inline attribute_hidden SEXP rcpp_set_stack_trace (SEXP e){
120
124
typedef SEXP (*Fun)(SEXP) ;
121
125
static Fun fun = GET_CALLABLE (" rcpp_set_stack_trace" ) ;
122
126
return fun (e) ;
123
127
}
124
128
125
- inline std::string demangle ( const std::string& name){
129
+ inline attribute_hidden std::string demangle ( const std::string& name){
126
130
typedef std::string (*Fun)( const std::string& ) ;
127
131
static Fun fun = GET_CALLABLE (" demangle" ) ;
128
132
return fun (name) ;
129
133
}
130
134
131
- inline const char * short_file_name (const char * file) {
135
+ inline attribute_hidden const char * short_file_name (const char * file) {
132
136
typedef const char * (*Fun)(const char *) ;
133
137
static Fun fun = GET_CALLABLE (" short_file_name" ) ;
134
138
return fun (file) ;
135
139
}
136
- inline SEXP stack_trace ( const char *file, int line){
140
+ inline attribute_hidden SEXP stack_trace ( const char *file, int line){
137
141
typedef SEXP (*Fun)(const char *, int ) ;
138
142
static Fun fun = GET_CALLABLE (" stack_trace" ) ;
139
143
return fun (file, line) ;
140
144
}
141
145
142
- inline SEXP get_string_elt (SEXP s, int i){
146
+ inline attribute_hidden SEXP get_string_elt (SEXP s, int i){
143
147
typedef SEXP (*Fun)(SEXP, int ) ;
144
148
static Fun fun = GET_CALLABLE (" get_string_elt" ) ;
145
149
return fun (s, i) ;
146
150
}
147
151
148
- inline const char * char_get_string_elt (SEXP s, int i){
152
+ inline attribute_hidden const char * char_get_string_elt (SEXP s, int i){
149
153
typedef const char * (*Fun)(SEXP, int ) ;
150
154
static Fun fun = GET_CALLABLE (" char_get_string_elt" ) ;
151
155
return fun (s, i);
152
156
}
153
157
154
- inline void set_string_elt (SEXP s, int i, SEXP v){
158
+ inline attribute_hidden void set_string_elt (SEXP s, int i, SEXP v){
155
159
typedef void (*Fun)(SEXP,int ,SEXP) ;
156
160
static Fun fun = GET_CALLABLE (" set_string_elt" ) ;
157
161
fun (s, i, v) ;
158
162
}
159
163
160
- inline void char_set_string_elt (SEXP s, int i, const char * v){
164
+ inline attribute_hidden void char_set_string_elt (SEXP s, int i, const char * v){
161
165
typedef void (*Fun)(SEXP,int , const char *) ;
162
166
static Fun fun = GET_CALLABLE (" char_set_string_elt" ) ;
163
167
fun (s, i, v ) ;
164
168
}
165
169
166
- inline SEXP* get_string_ptr (SEXP s){
170
+ inline attribute_hidden SEXP* get_string_ptr (SEXP s){
167
171
typedef SEXP* (*Fun)(SEXP) ;
168
172
static Fun fun = GET_CALLABLE (" get_string_ptr" ) ;
169
173
return fun (s) ;
170
174
}
171
175
172
- inline SEXP get_vector_elt (SEXP v, int i){
176
+ inline attribute_hidden SEXP get_vector_elt (SEXP v, int i){
173
177
typedef SEXP (*Fun)(SEXP, int );
174
178
static Fun fun = GET_CALLABLE (" get_vector_elt" ) ;
175
179
return fun (v, i) ;
176
180
}
177
181
178
- inline void set_vector_elt (SEXP v, int i, SEXP x){
182
+ inline attribute_hidden void set_vector_elt (SEXP v, int i, SEXP x){
179
183
typedef void (*Fun)(SEXP, int , SEXP) ;
180
184
static Fun fun = GET_CALLABLE (" set_vector_elt" ) ;
181
185
fun (v, i, x) ;
182
186
}
183
187
184
- inline SEXP* get_vector_ptr (SEXP v){
188
+ inline attribute_hidden SEXP* get_vector_ptr (SEXP v){
185
189
typedef SEXP* (*Fun)(SEXP) ;
186
190
static Fun fun = GET_CALLABLE (" get_vector_ptr" ) ;
187
191
return fun (v) ;
188
192
}
189
193
190
- inline const char * char_nocheck ( SEXP x){
194
+ inline attribute_hidden const char * char_nocheck ( SEXP x){
191
195
typedef const char * (*Fun)(SEXP) ;
192
196
static Fun fun = GET_CALLABLE (" char_nocheck" ) ;
193
197
return fun (x) ;
194
198
}
195
199
196
- inline void * dataptr (SEXP x){
200
+ inline attribute_hidden void * dataptr (SEXP x){
197
201
typedef void * (*Fun)(SEXP) ;
198
202
static Fun fun = GET_CALLABLE (" dataptr" ) ;
199
203
return fun (x) ;
200
204
}
201
205
202
- inline Rcpp::Module* getCurrentScope (){
206
+ inline attribute_hidden Rcpp::Module* getCurrentScope (){
203
207
typedef Rcpp::Module* (*Fun)(void ) ;
204
208
static Fun fun = GET_CALLABLE (" getCurrentScope" ) ;
205
209
return fun ();
206
210
}
207
211
208
- inline void setCurrentScope ( Rcpp::Module* mod ){
212
+ inline attribute_hidden void setCurrentScope ( Rcpp::Module* mod ){
209
213
typedef void (*Fun)(Rcpp::Module*) ;
210
214
static Fun fun = GET_CALLABLE (" setCurrentScope" ) ;
211
215
fun (mod) ;
212
216
}
213
217
214
- inline int * get_cache ( int n ){
218
+ inline attribute_hidden int * get_cache ( int n ){
215
219
typedef int * (*Fun)(int ) ;
216
220
static Fun fun = GET_CALLABLE (" get_cache" ) ;
217
221
return fun (n) ;
218
222
}
219
223
220
- inline SEXP reset_current_error (){
224
+ inline attribute_hidden SEXP reset_current_error (){
221
225
typedef SEXP (*Fun)(void ) ;
222
226
static Fun fun = GET_CALLABLE (" reset_current_error" ) ;
223
227
return fun () ;
224
228
}
225
229
226
- inline int error_occured (){
230
+ inline attribute_hidden int error_occured (){
227
231
typedef int (*Fun)(void ) ;
228
232
static Fun fun = GET_CALLABLE (" error_occured" ) ;
229
233
return fun () ;
230
234
}
231
- inline SEXP rcpp_get_current_error (){
235
+ inline attribute_hidden SEXP rcpp_get_current_error (){
232
236
typedef SEXP (*Fun)(void ) ;
233
237
static Fun fun = GET_CALLABLE (" rcpp_get_current_error" ) ;
234
238
return fun () ;
0 commit comments