File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,6 @@ template <typename T> class CustomImporter ;
4040
4141namespace internal {
4242
43- char * get_string_buffer () ;
44-
4543 inline SEXP make_charsexp__impl__wstring ( const wchar_t * data ){
4644 char * buffer = get_string_buffer () ;
4745 wcstombs ( buffer, data, MAXELTSIZE ) ;
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ namespace Rcpp{
3030 namespace internal {
3131 unsigned long enterRNGScope ();
3232 unsigned long exitRNGScope () ;
33+ char * get_string_buffer () ;
3334 }
3435 SEXP get_Rcpp_namespace () ;
3536 SEXP rcpp_get_stack_trace () ;
@@ -100,6 +101,12 @@ namespace Rcpp {
100101 static Fun fun = GET_CALLABLE (" exitRNGScope" ) ;
101102 return fun () ;
102103 }
104+
105+ inline char * get_string_buffer (){
106+ typedef char * (*Fun)(void ) ;
107+ static Fun fun = GET_CALLABLE (" get_string_buffer" ) ;
108+ return fun ();
109+ }
103110 }
104111
105112 inline SEXP get_Rcpp_namespace () {
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ void registerFunctions(){
109109 RCPP_REGISTER (dataptr)
110110 RCPP_REGISTER (getCurrentScope)
111111 RCPP_REGISTER (setCurrentScope)
112+ RCPP_REGISTER (get_string_buffer)
112113 RCPP_REGISTER (mktime00)
113114 RCPP_REGISTER (gmtime_)
114115 #undef RCPP_REGISTER
You can’t perform that action at this time.
0 commit comments