Skip to content

Commit 6d88c20

Browse files
committed
comment-out / reverse yesterday's commit 94fc145
a function print() in global namespace too likely to clash with other definitions
1 parent 3f92f23 commit 6d88c20

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2015-03-02 Dirk Eddelbuettel <[email protected]>
2+
3+
* src/api.cpp: Commented-out print() in global namespace
4+
* src/Rcpp_init.cpp: Commented-out registration of print()
5+
* inst/include/Rcpp/routines.h: Commented-out initialization
6+
17
2015-03-01 Dirk Eddelbuettel <[email protected]>
28

39
* src/api.cpp: New function print() as a wrapper around Rf_PrintValue()

inst/include/Rcpp/routines.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void setCurrentScope( Rcpp::Module* mod );
5959
SEXP reset_current_error();
6060
int error_occured();
6161
SEXP rcpp_get_current_error();
62-
void print(SEXP s);
62+
// void print(SEXP s);
6363

6464
#else
6565

@@ -245,11 +245,11 @@ inline attribute_hidden SEXP rcpp_get_current_error(){
245245
return fun();
246246
}
247247

248-
inline attribute_hidden void print(SEXP s) {
249-
typedef void (*Fun)(SEXP);
250-
static Fun fun = GET_CALLABLE("print");
251-
fun(s);
252-
}
248+
// inline attribute_hidden void print(SEXP s) {
249+
// typedef void (*Fun)(SEXP);
250+
// static Fun fun = GET_CALLABLE("print");
251+
// fun(s);
252+
// }
253253

254254
#endif
255255

src/Rcpp_init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void registerFunctions(){
116116
RCPP_REGISTER(reset_current_error)
117117
RCPP_REGISTER(error_occured)
118118
RCPP_REGISTER(rcpp_get_current_error)
119-
RCPP_REGISTER(print)
119+
//RCPP_REGISTER(print)
120120
#undef RCPP_REGISTER
121121
}
122122

src/api.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,10 @@ SEXP stack_trace( const char* file, int line ){
298298
#endif
299299
}
300300

301-
// [[Rcpp::register]]
302-
void print(SEXP s) {
303-
Rf_PrintValue(s); // defined in Rinternals.h
304-
}
301+
// // [ [ Rcpp::register ] ]
302+
// void print(SEXP s) {
303+
// Rf_PrintValue(s); // defined in Rinternals.h
304+
// }
305305

306306
// }}}
307307

0 commit comments

Comments
 (0)