[Rcpp-commits] r1728 - pkg/Rcpp/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 25 12:34:52 CEST 2010


Author: romain
Date: 2010-06-25 12:34:51 +0200 (Fri, 25 Jun 2010)
New Revision: 1728

Modified:
   pkg/Rcpp/src/RcppFrame.cpp
Log:
wrap( RcppFrame ) factored out of RcppResultSet

Modified: pkg/Rcpp/src/RcppFrame.cpp
===================================================================
--- pkg/Rcpp/src/RcppFrame.cpp	2010-06-25 10:34:25 UTC (rev 1727)
+++ pkg/Rcpp/src/RcppFrame.cpp	2010-06-25 10:34:51 UTC (rev 1728)
@@ -331,14 +331,16 @@
 			    break ;
 			    }
 			case COLTYPE_STRING:
+				{
 			    value = PROTECT(Rf_allocVector(STRSXP,nrow));
 			    numProtected++;
 			    for (int j=0; j < nrow; j++) {
 				SET_STRING_ELT(value, j, Rf_mkChar(table[j][i].getStringValue().c_str()));
 			    }
 			    break;
-			    
+			    }
 			case COLTYPE_LOGICAL:
+				{
 				value = PROTECT(Rf_allocVector(LGLSXP,nrow));
 			    numProtected++;
 			    int* p = LOGICAL(value) ;
@@ -346,8 +348,9 @@
 				p[j] = table[j][i].getLogicalValue();
 			    }
 			    break;
-			    
-			case COLTYPE_DATE:    
+			    }
+			case COLTYPE_DATE:  
+				{
 			    value = PROTECT(Rf_allocVector(REALSXP,nrow));
 			    numProtected++;
 			    double* p = REAL(value) ;
@@ -355,8 +358,9 @@
 				p[j] = table[j][i].getDateRCode();
 			    Rf_setAttrib(value, R_ClassSymbol, Rf_mkString("Date"));
 			    break; 
-			    
+			    }
 			case COLTYPE_DATETIME:
+				{
 			    value = PROTECT(Rf_allocVector(REALSXP,nrow));
 			    numProtected++;
 			    double* p = REAL(value) ;
@@ -367,7 +371,7 @@
 			    }
 			    Rf_setAttrib(value, R_ClassSymbol, Rcpp::internal::getPosixClasses() );
 			    break; 
-			    
+			    }
 			default:
 				// throw std::range_error("RcppResultSet::add invalid column type");
 				break ;



More information about the Rcpp-commits mailing list