MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / get_function_ptr

Method get_function_ptr

inst/include/Rcpp/module/Module.h:179–190  ·  view source on GitHub ↗

* get the underlying C++ function pointer as a DL_FUNC */

Source from the content-addressed store, hash-verified

177 * get the underlying C++ function pointer as a DL_FUNC
178 */
179 inline DL_FUNC get_function_ptr( const std::string& name_ ){
180 MAP::iterator it = functions.begin() ;
181 size_t n = functions.size() ;
182 CppFunction* fun = 0 ;
183 for( size_t i=0; i<n; i++, ++it){
184 if( name_.compare( it->first ) == 0){
185 fun = it->second ;
186 break ;
187 }
188 }
189 return fun->get_function_ptr() ;
190 }
191
192 inline void Add( const char* name_ , CppFunction* ptr){
193 R_RegisterCCallable( prefix.c_str(), name_, ptr->get_function_ptr() ) ;

Callers 1

AddMethod · 0.45

Calls 2

beginMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected