| 69 | } |
| 70 | |
| 71 | void |
| 72 | RCommand::SetFunctionClosure(SEXP FN) |
| 73 | { |
| 74 | if (FN != this->m_FunctionClosure) |
| 75 | { |
| 76 | if (this->m_FunctionClosure != R_NilValue) |
| 77 | { |
| 78 | R_ReleaseObject(this->m_FunctionClosure); |
| 79 | } |
| 80 | this->m_FunctionClosure = FN; |
| 81 | R_PreserveObject(this->m_FunctionClosure); |
| 82 | |
| 83 | // set up expression for evaluation |
| 84 | SEXP R_fcall; |
| 85 | // Rf_lang1 creates an executable pair list with one |
| 86 | // element |
| 87 | R_fcall = PROTECT(Rf_lang1(this->m_FunctionClosure)); |
| 88 | this->SetCallbackRCallable(R_fcall); |
| 89 | this->SetCallbackREnviron(CLOENV(this->m_FunctionClosure)); |
| 90 | UNPROTECT(1); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | |
| 95 | SEXP |
nothing calls this directly
no test coverage detected