The R Project SVN R

Rev

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

Rev 13606 Rev 15890
Line 705... Line 705...
705
    if( !isvec ) 
705
    if( !isvec ) 
706
	return mkFalse();
706
	return mkFalse();
707
    return rval;
707
    return rval;
708
}
708
}
709
	
709
	
-
 
710
 
-
 
711
/* standardGeneric:  uses a pointer to R_standardGeneric, to be
-
 
712
   initialized when the methods package is attached.  When and if the
-
 
713
   methods code is automatically included, the pointer will not be
-
 
714
   needed 
-
 
715
*/
-
 
716
 
-
 
717
typedef SEXP (*R_stdGen_ptr_t)(SEXP, SEXP);
-
 
718
 
-
 
719
R_stdGen_ptr_t R_standardGeneric_ptr = 0;
-
 
720
 
-
 
721
SEXP do_standardGeneric(SEXP call, SEXP op, SEXP args, SEXP env)
-
 
722
{
-
 
723
  SEXP arg, value;
-
 
724
  if(!R_standardGeneric_ptr)
-
 
725
    error("Using standardGeneric before the methods package has been attached");
-
 
726
 
-
 
727
  checkArity(op, args);
-
 
728
 
-
 
729
  PROTECT(arg = CAR(args));
-
 
730
 
-
 
731
  value = (*R_standardGeneric_ptr)(arg, env);
-
 
732
  
-
 
733
  UNPROTECT(1);
-
 
734
  return value;
-
 
735
}
-
 
736