SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/src/Mutils.h
ViewVC logotype

Diff of /pkg/Matrix/src/Mutils.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2351, Wed Mar 25 10:41:05 2009 UTC revision 2354, Mon Mar 30 15:31:23 2009 UTC
# Line 314  Line 314 
314      return -1;      return -1;
315  }  }
316    
317    /**
318     * Return the 0-based index of an is() match in a vector of class-name
319     * strings terminated by an empty string.  Returns -1 for no match.
320     *
321     * @param x  an R object, about which we want is(x, .) information.
322     * @param valid vector of possible matches terminated by an empty string.
323     *
324     * @return index of match or -1 for no match
325     */
326    static R_INLINE int
327    Matrix_check_class_etc(SEXP x, char **valid)
328    {
329        SEXP cl = getAttrib(x, R_ClassSymbol),
330            pkg = getAttrib(cl, install("package")), /* ==R== packageSlot(class(x)) */
331            rho = (isNull(pkg) ? R_GlobalEnv
332                   : eval(lang2(install(".M.classEnv"), cl), R_GlobalEnv));
333        return Matrix_check_class_and_super(x, valid, rho);
334    }
335    
336    
337  #ifdef __cplusplus  #ifdef __cplusplus
338  }  }

Legend:
Removed from v.2351  
changed lines
  Added in v.2354

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge