Commit 1cacced4 authored by Antoine Lucas's avatar Antoine Lucas
Browse files

fix protect/unprotect

parent 11f42ef5
......@@ -120,11 +120,10 @@ namespace bigrationalR
if (TYPEOF(dimAttr) == INTSXP)
v.nrow = INTEGER(dimAttr)[0];
else {
// catch to get std matrix dimensions value
dimKey = Rf_mkString("dim");
dimAttr = Rf_getAttrib(param,dimKey );
v.nrow = (TYPEOF(dimAttr) == INTSXP) ? INTEGER(dimAttr)[0] : -1;
}
// catch to get std matrix dimensions value
dimAttr = Rf_getAttrib(param,R_DimSymbol );
v.nrow = (TYPEOF(dimAttr) == INTSXP) ? INTEGER(dimAttr)[0] : -1;
}
if (TYPEOF(denAttr) != NILSXP)
{
bigvec_q attrib = bigrationalR::create_vector(denAttr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment