Matrix r5059
Loading...
Searching...
No Matches
version.c
Go to the documentation of this file.
1#include <Rinternals.h>
2#include "version.h"
3
5{
6 SEXP ans, nms;
7 PROTECT(ans = Rf_allocVector(INTSXP, 3));
8 INTEGER(ans)[0] = MATRIX_PACKAGE_VERSION;
9 INTEGER(ans)[1] = MATRIX_ABI_VERSION;
10 INTEGER(ans)[2] = MATRIX_SUITESPARSE_VERSION;
11 PROTECT(nms = Rf_allocVector(STRSXP, 3));
12 SET_STRING_ELT(nms, 0, Rf_mkChar("package"));
13 SET_STRING_ELT(nms, 1, Rf_mkChar("abi"));
14 SET_STRING_ELT(nms, 2, Rf_mkChar("suitesparse"));
15 Rf_setAttrib(ans, R_NamesSymbol, nms);
16 UNPROTECT(2);
17 return ans;
18}
SEXP R_Matrix_version(void)
Definition version.c:4
#define MATRIX_SUITESPARSE_VERSION
Definition version.h:13
#define MATRIX_PACKAGE_VERSION
Definition version.h:5
#define MATRIX_ABI_VERSION
Definition version.h:10