[Rcpp-commits] r3885 - scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Nov 2 17:05:50 CET 2012
Author: romain
Date: 2012-11-02 17:05:49 +0100 (Fri, 02 Nov 2012)
New Revision: 3885
Modified:
scripts/generator_Module_CppFunction.R
Log:
generate get_function_ptr
Modified: scripts/generator_Module_CppFunction.R
===================================================================
--- scripts/generator_Module_CppFunction.R 2012-11-02 03:54:03 UTC (rev 3884)
+++ scripts/generator_Module_CppFunction.R 2012-11-02 16:05:49 UTC (rev 3885)
@@ -16,7 +16,8 @@
inline int nargs(){ return %d; }
inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,%s>(s, name) ; }
-
+ inline DL_FUNC get_function_ptr(){ return (DL_FUNC)ptr_fun ; }
+
private:
OUT (*ptr_fun)(%s) ;
} ;
@@ -34,7 +35,8 @@
inline int nargs(){ return %d; }
inline bool is_void(){ return true; }
inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,%s>(s, name) ; }
-
+ inline DL_FUNC get_function_ptr(){ return (DL_FUNC)ptr_fun ; }
+
private:
void (*ptr_fun)(%s) ;
} ;
@@ -55,7 +57,8 @@
inline int nargs(){ return %d; }
inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT,%s>(s, name) ; }
SEXP get_formals(){ return formals; }
-
+ inline DL_FUNC get_function_ptr(){ return (DL_FUNC)ptr_fun ; }
+
private:
Rcpp::List formals ;
OUT (*ptr_fun)(%s) ;
@@ -76,7 +79,8 @@
inline bool is_void(){ return true; }
inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type,%s>(s, name) ; }
SEXP get_formals(){ return formals; }
-
+ inline DL_FUNC get_function_ptr(){ return (DL_FUNC)ptr_fun ; }
+
private:
Rcpp::List formals ;
void (*ptr_fun)(%s) ;
@@ -162,7 +166,8 @@
inline int nargs(){ return 0; }
inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT>(s, name) ; }
-
+ inline DL_FUNC get_function_ptr(){ return (DL_FUNC)ptr_fun ; }
+
private:
OUT (*ptr_fun)(void) ;
} ;
@@ -181,7 +186,8 @@
inline int nargs(){ return 0; }
inline bool is_void(){ return true; }
inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type>(s, name) ; }
-
+ inline DL_FUNC get_function_ptr(){ return (DL_FUNC)ptr_fun ; }
+
private:
void (*ptr_fun)(void) ;
} ;
@@ -197,7 +203,8 @@
inline int nargs(){ return 0; }
inline void signature(std::string& s, const char* name){ Rcpp::signature<OUT>(s, name) ; }
-
+ inline DL_FUNC get_function_ptr(){ return (DL_FUNC)ptr_fun ; }
+
private:
OUT (*ptr_fun)(void) ;
} ;
@@ -216,7 +223,8 @@
inline int nargs(){ return 0; }
inline bool is_void(){ return true; }
inline void signature(std::string& s, const char* name){ Rcpp::signature<void_type>(s, name) ; }
-
+ inline DL_FUNC get_function_ptr(){ return (DL_FUNC)ptr_fun ; }
+
private:
void (*ptr_fun)(void) ;
} ;
More information about the Rcpp-commits
mailing list