[Rd] Patch for RJSONIO
Ben Bolker
bbo|ker @end|ng |rom gm@||@com
Tue Mar 25 23:58:05 CET 2025
Maybe https://github.com/duncantl/RJSONIO ?
(That page also points to https://omegahat.org/RJSONIO, which is now
defunct ...)
On 3/25/25 18:53, Dirk Eddelbuettel wrote:
>
> I can never remember where the canonical sources are for the effectively-CRAN
> maintained packages so I am dropping it here -- yesterday's update to RJSONIO
> does not build on anything older than r-devel. This patch helps, feel free
> to adjust as needed.
>
> Dirk
>
>
> diff -ru RJSONIO.orig/src/RJSON.c RJSONIO/src/RJSON.c
> --- RJSONIO.orig/src/RJSON.c 2025-03-24 02:10:08.000000000 -0500
> +++ RJSONIO/src/RJSON.c 2025-03-25 17:49:50.490016649 -0500
> @@ -2,6 +2,7 @@
>
> #include <Rinternals.h>
> #include <Rdefines.h>
> +#include <Rversion.h>
>
> #include "ConvertUTF.h"
>
> @@ -70,7 +71,11 @@
> ptr = REAL(tmp);
> break;
> case VECSXP:
> +#if R_VERSION >= R_Version(4,5,0)
> ptr = (void *) VECTOR_PTR_RO(tmp);
> +#else
> + ptr = (void *) VECTOR_PTR(tmp);
> +#endif
> break;
> default:
> ptr = NULL;
>
>
More information about the R-devel
mailing list