Skip to content

Commit fa6dc4e

Browse files
committed
for testing, default to 'new' classes
new DateVector & DatetimeVector
1 parent 27358a5 commit fa6dc4e

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
2016-10-16 Dirk Eddelbuettel <[email protected]>
22

3+
* inst/include/Rcpp.h (RCPP_NEW_DATE_DATETIME_VECTORS): Add a new
4+
compile-time #define to switch between 'old' (existing) and 'new'
5+
DateVector and DatimeVector classes. Currently uses 'new' for testing
6+
plan to switch to proper deprecation schedule.
7+
38
* inst/include/Rcpp/date_datetime/date_datetime.h: New header file (and
49
directory) regrouping all Date and Datetime headers, scalar and vector
510

inst/include/Rcpp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
#include <Rcpp/Formula.h>
5757
#include <Rcpp/DataFrame.h>
5858

59+
#define RCPP_NEW_DATE_DATETIME_VECTORS 1
5960
#include <Rcpp/date_datetime/date_datetime.h>
6061

6162
#include <Rcpp/Na_Proxy.h>

inst/include/Rcpp/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define RCPP_VERSION Rcpp_Version(0,12,7)
3131

3232
// the current source snapshot
33-
#define RCPP_DEV_VERSION RcppDevVersion(0,12,7,0)
33+
#define RCPP_DEV_VERSION RcppDevVersion(0,12,7,1)
3434

3535
#endif
3636

inst/include/Rcpp/date_datetime/date_datetime.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,19 @@
3232

3333
namespace Rcpp {
3434

35-
// for now default to the existing classes
36-
typedef oldDateVector DateVector;
37-
typedef oldDatetimeVector DatetimeVector;
35+
// this will not be on by default
36+
#if defined(RCPP_NEW_DATE_DATETIME_VECTORS)
37+
38+
typedef oldDateVector DateVector;
39+
typedef oldDatetimeVector DatetimeVector;
40+
41+
#else
42+
43+
// for now the fallback-default is to use the existing classes
44+
typedef oldDateVector DateVector;
45+
typedef oldDatetimeVector DatetimeVector;
46+
47+
#endif
3848

3949
}
4050

0 commit comments

Comments
 (0)