Skip to content

Commit

Permalink
restore deprecated '{set,unset}_pomp_userdata'
Browse files Browse the repository at this point in the history
  • Loading branch information
kingaa committed Dec 2, 2023
1 parent 2940a85 commit 814d25d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: pomp
Type: Package
Title: Statistical Inference for Partially Observed Markov Processes
Version: 5.4.3.3
Date: 2023-12-01
Version: 5.4.4.0
Date: 2023-12-02
Authors@R: c(person(given=c("Aaron","A."),family="King",role=c("aut","cre"),email="kingaa@umich.edu",comment=c(ORCID="0000-0001-6159-3207")),
person(given=c("Edward","L."),family="Ionides",role="aut",comment=c(ORCID="0000-0002-4190-0174")) ,
person(given="Carles",family="Bretó",role="aut",comment=c(ORCID="0000-0003-4695-4902")),
Expand Down
6 changes: 6 additions & 0 deletions inst/NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
_N_e_w_s _f_o_r _p_a_c_k_a_g_e '_p_o_m_p'

_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _5._4._4:

• C-level functions ‘set_pomp_userdata’ and
‘unset_pomp_userdata’ have been temporarily restored. The
latter generates a warning.

_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _5._4._3:

• There is now access to ordinary B-spline basis functions (and
Expand Down
6 changes: 6 additions & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
\name{NEWS}
\title{News for package `pomp'}
\section{Changes in \pkg{pomp} version 5.4.4}{
\itemize{
\item C-level functions \code{set_pomp_userdata} and \code{unset_pomp_userdata} have been temporarily restored.
The latter generates a warning.
}
}
\section{Changes in \pkg{pomp} version 5.4.3}{
\itemize{
\item There is now access to ordinary B-spline basis functions (and their derivatives) at the C snippet level.
Expand Down
2 changes: 2 additions & 0 deletions inst/include/pomp_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ typedef void table_lookup_t (lookup_table_t *tab, double x, double *y);
typedef SEXP apply_probe_data_t (SEXP object, SEXP probes);
typedef SEXP apply_probe_sim_t (SEXP object, SEXP nsim, SEXP params, SEXP probes, SEXP datval, SEXP gnsi);
typedef SEXP systematic_resampling_t (SEXP weights);
typedef void set_pomp_userdata_t (SEXP userdata);
typedef void unset_pomp_userdata_t (void);
typedef SEXP get_covariate_names_t (SEXP object);

static R_INLINE SEXP makearray (int rank, const int *dim) {
Expand Down
3 changes: 3 additions & 0 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ void R_init_pomp (DllInfo *info) {
R_RegisterCCallable("pomp","apply_probe_sim",(DL_FUNC) &apply_probe_sim);
R_RegisterCCallable("pomp","systematic_resampling",(DL_FUNC) &systematic_resampling);
R_RegisterCCallable("pomp","randwalk_perturbation", (DL_FUNC) &randwalk_perturbation);
// THE FOLLOWING TWO FUNCTIONS WILL GO AWAY SOON
R_RegisterCCallable("pomp","set_pomp_userdata",(DL_FUNC) &set_pomp_userdata);
R_RegisterCCallable("pomp","unset_pomp_userdata",(DL_FUNC) &unset_pomp_userdata);

// Register routines
R_registerRoutines(info,NULL,callMethods,NULL,NULL);
Expand Down
2 changes: 2 additions & 0 deletions src/pomp_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ typedef void table_lookup_t (lookup_table_t *tab, double x, double *y);
typedef SEXP apply_probe_data_t (SEXP object, SEXP probes);
typedef SEXP apply_probe_sim_t (SEXP object, SEXP nsim, SEXP params, SEXP probes, SEXP datval, SEXP gnsi);
typedef SEXP systematic_resampling_t (SEXP weights);
typedef void set_pomp_userdata_t (SEXP userdata);
typedef void unset_pomp_userdata_t (void);
typedef SEXP get_covariate_names_t (SEXP object);

static R_INLINE SEXP makearray (int rank, const int *dim) {
Expand Down
1 change: 1 addition & 0 deletions src/userdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ const double *get_userdata_double (const char *name) {

// WILL GO AWAY SOON
void unset_pomp_userdata (void) { // #nocov
warn("'unset_pomp_userdata' is now deprecated and will be removed in a future release."); // #nocov
USERDATA = R_NilValue; // #nocov
}

0 comments on commit 814d25d

Please sign in to comment.