The R Project SVN R

Rev

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

Rev 42307 Rev 42675
Line 948... Line 948...
948
	warningcall(call,
948
	warningcall(call,
949
		    _("standardGeneric called without methods dispatch enabled (will be ignored)"));
949
		    _("standardGeneric called without methods dispatch enabled (will be ignored)"));
950
	R_set_standardGeneric_ptr(dispatchNonGeneric, NULL);
950
	R_set_standardGeneric_ptr(dispatchNonGeneric, NULL);
951
	ptr = R_get_standardGeneric_ptr();
951
	ptr = R_get_standardGeneric_ptr();
952
    }
952
    }
953
/*    PROTECT(args);
-
 
954
      PROTECT(arg = CAR(args)); args are always protected */
-
 
955
 
953
 
956
    checkArity(op, args);
954
    checkArity(op, args); /* set to -1 */
957
    arg = CAR(args);
955
    arg = CAR(args);
958
    if(!isValidStringF(arg))
956
    if(!isValidStringF(arg))
959
      errorcall(call,
957
	errorcall(call,
960
		_("argument to standardGeneric must be a non-empty character string"));
958
		  _("argument to standardGeneric must be a non-empty character string"));
961
 
959
 
962
    PROTECT(fdef = get_this_generic(args));
960
    PROTECT(fdef = get_this_generic(args));
963
 
961
 
964
    if(isNull(fdef))
962
    if(isNull(fdef))
965
      error(_("call to standardGeneric(\"%s\") apparently not from the body of that generic function"), translateChar(STRING_ELT(arg, 0)));
963
	error(_("call to standardGeneric(\"%s\") apparently not from the body of that generic function"), translateChar(STRING_ELT(arg, 0)));
966
 
964
 
967
    value = (*ptr)(arg, env, fdef);
965
    value = (*ptr)(arg, env, fdef);
968
 
966
 
969
    UNPROTECT(1);
967
    UNPROTECT(1);
970
    return value;
968
    return value;