Commit 2e7f5f9a authored by Radford Neal's avatar Radford Neal

stubs for long vector compatibily, NEWS on it

parent 20902e4d
......@@ -114,6 +114,17 @@
\subsection{NEW FEATURES FROM LATER R CORE VERSIONS}{
\itemize{
\item From R-3.0.0: For compatibility with packages written to
be able to handle the long vectors introduced in R-3.0.0,
definitions for \code{R_xlen_t},
\code{R_XLEN_T_MAX}, \code{XLENGTH}, \code{XTRUELENGTH},
\code{SHORT_VEC_LENGTH}, \code{SET_SHORT_VEC_TRUELENGTH} are now
provided, all the same as the corresponding regular versions (as
is also the case for R-3.0.0+ on 32-bit platforms). The
\code{IS_LONG_VEC} macro is also defined (as always false).
Note, however, that packages that declare a dependency on
R >= 3.0.0 will not install even if they would in fact work
with pqR because of these compatibility definitions.
\item From R-3.0.0: The \code{srcfile} argument to \code{parse()} may now
be a character string, to be used in error messages.
\item The facilities for recording detailed parsing information
......
Add compatibility stubs for R_xlen_t, XLENGTH, etc.
......@@ -96,9 +96,14 @@ pid_t Rf_fork(void);
typedef unsigned char Rbyte;
/* type for length of vectors etc */
typedef int R_len_t; /* might later be unsigned or long */
/* Type for length of vectors, etc. For compatibility with R-3.x.y, the
"long vector" versions are also defined, same as the regular versions. */
typedef int R_len_t;
typedef int R_xlen_t;
#define R_LEN_T_MAX INT_MAX
#define R_XLEN_T_MAX R_LEN_T_MAX
/* Fundamental Data Types: These are largely Lisp
* influenced structures, with the exception of LGLSXP,
......@@ -396,7 +401,15 @@ static inline double *REAL(SEXP x)
return (double *) DATAPTR(x);
}
#endif
#endif /* USE_RINTERNALS */
/* Long/short versions for compatibility with R-3.x.y. */
#define XLENGTH(x) LENGTH(x)
#define XTRUELENGTH(x) TRUELENGTH(x)
#define SHORT_VEC_LENGTH(x) LENGTH(x)
#define SET_SHORT_VEC_TRUELENGTH(x,v) SET_TRUELENGTH((x),(v))
#define IS_LONG_VEC(x) 0
#define CAAR(e) CAR(CAR(e))
#define CDAR(e) CDR(CAR(e))
......
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