File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1515#include <R.h>
1616#include <R_ext/Rdynload.h>
1717#include <Rversion.h>
18+
1819#if !defined(R_VERSION ) || R_VERSION < R_Version (3 , 5 , 0 )
1920 #define USE_RINTERNALS
2021 #define DATAPTR_RO (x ) ((const void *)DATAPTR(x))
2122#endif
23+
24+ #if R_VERSION < R_Version (4 , 5 , 0 )
25+ # define isDataFrame (x ) Rf_isFrame(x)
26+ # define R_ClosureFormals (x ) FORMALS(x)
27+ # define R_ClosureEnv (x ) CLOENV(x)
28+ # define R_ParentEnv (x ) ENCLOS(x)
29+
30+ SEXP R_mkClosure (SEXP formals , SEXP body , SEXP env )
31+ {
32+ SEXP fun = Rf_allocSExp (CLOSXP );
33+ SET_FORMALS (fun , formals );
34+ SET_BODY (fun , body );
35+ SET_CLOENV (fun , env );
36+ return fun ;
37+ }
38+
39+ void CLEAR_ATTRIB (SEXP x )
40+ {
41+ SET_ATTRIB (x , R_NilValue );
42+ SET_OBJECT (x , 0 );
43+ UNSET_S4_OBJECT (x );
44+ }
45+ #endif
46+
2247#include <Rinternals.h>
2348#include <stdlib.h>
2449#include <stdint.h>
You can’t perform that action at this time.
0 commit comments