@@ -110,125 +110,129 @@ namespace Rcpp {
110110
111111}
112112
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 (){
114118 typedef SEXP (*Fun)(void ) ;
115119 static Fun fun = GET_CALLABLE (" rcpp_get_stack_trace" ) ;
116120 return fun () ;
117121}
118122
119- inline SEXP rcpp_set_stack_trace (SEXP e){
123+ inline attribute_hidden SEXP rcpp_set_stack_trace (SEXP e){
120124 typedef SEXP (*Fun)(SEXP) ;
121125 static Fun fun = GET_CALLABLE (" rcpp_set_stack_trace" ) ;
122126 return fun (e) ;
123127}
124128
125- inline std::string demangle ( const std::string& name){
129+ inline attribute_hidden std::string demangle ( const std::string& name){
126130 typedef std::string (*Fun)( const std::string& ) ;
127131 static Fun fun = GET_CALLABLE (" demangle" ) ;
128132 return fun (name) ;
129133}
130134
131- inline const char * short_file_name (const char * file) {
135+ inline attribute_hidden const char * short_file_name (const char * file) {
132136 typedef const char * (*Fun)(const char *) ;
133137 static Fun fun = GET_CALLABLE (" short_file_name" ) ;
134138 return fun (file) ;
135139}
136- inline SEXP stack_trace ( const char *file, int line){
140+ inline attribute_hidden SEXP stack_trace ( const char *file, int line){
137141 typedef SEXP (*Fun)(const char *, int ) ;
138142 static Fun fun = GET_CALLABLE (" stack_trace" ) ;
139143 return fun (file, line) ;
140144}
141145
142- inline SEXP get_string_elt (SEXP s, int i){
146+ inline attribute_hidden SEXP get_string_elt (SEXP s, int i){
143147 typedef SEXP (*Fun)(SEXP, int ) ;
144148 static Fun fun = GET_CALLABLE (" get_string_elt" ) ;
145149 return fun (s, i) ;
146150}
147151
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){
149153 typedef const char * (*Fun)(SEXP, int ) ;
150154 static Fun fun = GET_CALLABLE (" char_get_string_elt" ) ;
151155 return fun (s, i);
152156}
153157
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){
155159 typedef void (*Fun)(SEXP,int ,SEXP) ;
156160 static Fun fun = GET_CALLABLE (" set_string_elt" ) ;
157161 fun (s, i, v) ;
158162}
159163
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){
161165 typedef void (*Fun)(SEXP,int , const char *) ;
162166 static Fun fun = GET_CALLABLE (" char_set_string_elt" ) ;
163167 fun (s, i, v ) ;
164168}
165169
166- inline SEXP* get_string_ptr (SEXP s){
170+ inline attribute_hidden SEXP* get_string_ptr (SEXP s){
167171 typedef SEXP* (*Fun)(SEXP) ;
168172 static Fun fun = GET_CALLABLE (" get_string_ptr" ) ;
169173 return fun (s) ;
170174}
171175
172- inline SEXP get_vector_elt (SEXP v, int i){
176+ inline attribute_hidden SEXP get_vector_elt (SEXP v, int i){
173177 typedef SEXP (*Fun)(SEXP, int );
174178 static Fun fun = GET_CALLABLE (" get_vector_elt" ) ;
175179 return fun (v, i) ;
176180}
177181
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){
179183 typedef void (*Fun)(SEXP, int , SEXP) ;
180184 static Fun fun = GET_CALLABLE (" set_vector_elt" ) ;
181185 fun (v, i, x) ;
182186}
183187
184- inline SEXP* get_vector_ptr (SEXP v){
188+ inline attribute_hidden SEXP* get_vector_ptr (SEXP v){
185189 typedef SEXP* (*Fun)(SEXP) ;
186190 static Fun fun = GET_CALLABLE (" get_vector_ptr" ) ;
187191 return fun (v) ;
188192}
189193
190- inline const char * char_nocheck ( SEXP x){
194+ inline attribute_hidden const char * char_nocheck ( SEXP x){
191195 typedef const char * (*Fun)(SEXP) ;
192196 static Fun fun = GET_CALLABLE (" char_nocheck" ) ;
193197 return fun (x) ;
194198}
195199
196- inline void * dataptr (SEXP x){
200+ inline attribute_hidden void * dataptr (SEXP x){
197201 typedef void * (*Fun)(SEXP) ;
198202 static Fun fun = GET_CALLABLE (" dataptr" ) ;
199203 return fun (x) ;
200204}
201205
202- inline Rcpp::Module* getCurrentScope (){
206+ inline attribute_hidden Rcpp::Module* getCurrentScope (){
203207 typedef Rcpp::Module* (*Fun)(void ) ;
204208 static Fun fun = GET_CALLABLE (" getCurrentScope" ) ;
205209 return fun ();
206210}
207211
208- inline void setCurrentScope ( Rcpp::Module* mod ){
212+ inline attribute_hidden void setCurrentScope ( Rcpp::Module* mod ){
209213 typedef void (*Fun)(Rcpp::Module*) ;
210214 static Fun fun = GET_CALLABLE (" setCurrentScope" ) ;
211215 fun (mod) ;
212216}
213217
214- inline int * get_cache ( int n ){
218+ inline attribute_hidden int * get_cache ( int n ){
215219 typedef int * (*Fun)(int ) ;
216220 static Fun fun = GET_CALLABLE (" get_cache" ) ;
217221 return fun (n) ;
218222}
219223
220- inline SEXP reset_current_error (){
224+ inline attribute_hidden SEXP reset_current_error (){
221225 typedef SEXP (*Fun)(void ) ;
222226 static Fun fun = GET_CALLABLE (" reset_current_error" ) ;
223227 return fun () ;
224228}
225229
226- inline int error_occured (){
230+ inline attribute_hidden int error_occured (){
227231 typedef int (*Fun)(void ) ;
228232 static Fun fun = GET_CALLABLE (" error_occured" ) ;
229233 return fun () ;
230234}
231- inline SEXP rcpp_get_current_error (){
235+ inline attribute_hidden SEXP rcpp_get_current_error (){
232236 typedef SEXP (*Fun)(void ) ;
233237 static Fun fun = GET_CALLABLE (" rcpp_get_current_error" ) ;
234238 return fun () ;
0 commit comments