Skip to content

Commit 6f291db

Browse files
committed
improvements to new Date(time)vector classes
with thanks to @kevinushey
1 parent 0319664 commit 6f291db

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

inst/include/Rcpp/date_datetime/date_datetime.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ namespace Rcpp {
3535
// this will not be on by default
3636
#if defined(RCPP_NEW_DATE_DATETIME_VECTORS)
3737

38-
typedef oldDateVector DateVector;
39-
typedef oldDatetimeVector DatetimeVector;
38+
typedef newDateVector DateVector;
39+
typedef newDatetimeVector DatetimeVector;
4040

4141
#else
4242

inst/include/Rcpp/date_datetime/newDateVector.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ namespace Rcpp {
4242
private:
4343

4444
void setClass() {
45-
Rf_setAttrib(*this, R_ClassSymbol, Rf_mkString("Date"));
45+
Shield<SEXP> dateclass(Rf_mkString("Date"));
46+
Rf_setAttrib(*this, R_ClassSymbol, dateclass);
4647
}
4748
};
4849
}

0 commit comments

Comments
 (0)