Skip to content

Commit 60d1f93

Browse files
author
luke
committed
More Rcpp work-arounds.
git-svn-id: https://svn.r-project.org/R/trunk@89115 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 103336e commit 60d1f93

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/include/R_ext/Callbacks.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,15 @@
2929
#define R_FAKE_CALLBACKS_H
3030

3131
// new code should include R_ext/ObjectTable.h directly
32-
#if ! defined(RcppCommon_h)
32+
#ifdef RcppCommon_h
33+
# if RCPP_VERSION > Rcpp_Version(1,1,0)
34+
#warning include R_ext/ObjectTable.h for R_ObjectTable declarations
35+
# endif
36+
#else
3337
#warning include R_ext/ObjectTable.h for R_ObjectTable declarations
3438
#endif
3539

40+
// to ease the transition from R_ext/Callbacks.h to R_ext/ObjectTable.h
3641
#include <R_ext/ObjectTable.h>
3742

3843
#endif /* R_FAKE_CALLBACKS_H */

src/include/R_ext/PrtUtil.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@
2727
#ifndef FAKE_PRTUTIL_H_
2828
#define FAKE_PRTUTIL_H_
2929

30-
#if ! defined(COMPILING_RCPP)
30+
#ifdef COMPILING_RCPP
31+
# if RCPP_VERSION > Rcpp_Version(1,1,0)
32+
#warning non-API header file R_ext/PrtUtil.h is obsolete and will be removed
33+
# endif
34+
#else
3135
#warning non-API header file R_ext/PrtUtil.h is obsolete and will be removed
3236
#endif
3337

38+
// for packages relying on the old R_ext/PrtUtil.h bringing this in
39+
#include <Rinternals.h>
40+
3441
#endif /* FAKE_PRTUTIL_H_ */

0 commit comments

Comments
 (0)