Ejemplo n.º 1
0
// enabling tracing on a function turns it into an S4 object with an 'original'
// slot that includes the function's original contents. use this instead if
// it's set up. (consider: is it safe to assume that S4 objects here are always
// traced functions, or do we need to compare classes to be safe?)
SEXP RCntxt::originalFunctionCall() const
{
   SEXP callObject = callfun();

   if (Rf_isS4(callObject))
   {
      callObject = r::sexp::getAttrib(callObject, "original");
   }
   return callObject;
}
Ejemplo n.º 2
0
int main() {
  callfun(& callme);
  assert(x == 5);
  return 0;
}
Ejemplo n.º 3
0
bool RCntxt::isErrorHandler() const
{
   SEXP errFlag = r::sexp::getAttrib(callfun(), "errorHandlerType");
   return TYPEOF(errFlag) == INTSXP;
}
Ejemplo n.º 4
0
bool RCntxt::isDebugHidden() const
{
   SEXP hideFlag = r::sexp::getAttrib(callfun(), "hideFromDebugger");
   return TYPEOF(hideFlag) != NILSXP && r::sexp::asLogical(hideFlag);
}