The R Project SVN R

Rev

Rev 26648 | Rev 27710 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26648 Rev 27412
Line 483... Line 483...
483
	callenv = env;
483
	callenv = env;
484
	defenv = R_GlobalEnv;
484
	defenv = R_GlobalEnv;
485
    }
485
    }
486
 
486
 
487
    /* set up the arglist */
487
    /* set up the arglist */
488
    /**** FIXME: need test for symbol? */
-
 
489
    s = R_LookupMethod(CAR(cptr->call), env, callenv, defenv);
488
    s = R_LookupMethod(CAR(cptr->call), env, callenv, defenv);
490
    if (TYPEOF(s) == PROMSXP)
489
    if (TYPEOF(s) == PROMSXP)  /* looks like R_LookupMethod just did this */
491
	s = eval(s, env);
490
	s = eval(s, env);
-
 
491
    if (TYPEOF(s) == SYMSXP && s == R_UnboundValue) 
-
 
492
	error("No calling generic was found: was a method called directly?");
492
    if (TYPEOF(s) != CLOSXP){
493
    if (TYPEOF(s) != CLOSXP){
493
	errorcall(R_NilValue, "function is not a closure");
494
	errorcall(R_NilValue, "function is not a closure, but of type %d", 
-
 
495
		  TYPEOF(s));
494
    }
496
    }
495
    /* get formals and actuals; attach the names of the formals to
497
    /* get formals and actuals; attach the names of the formals to
496
       the actuals, expanding any ... that occurs */
498
       the actuals, expanding any ... that occurs */
497
    formals = FORMALS(s);
499
    formals = FORMALS(s);
498
    PROTECT(actuals = matchArgs(formals, cptr->promargs));
500
    PROTECT(actuals = matchArgs(formals, cptr->promargs));