Skip to content

Commit ede7539

Browse files
committed
Use SEXP objects in R tasks again
Since we relaxed the `Send` requirement on tasks
1 parent d8f9d56 commit ede7539

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/ark/tests/environment.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn test_environment_list() {
6969
let incoming_tx = comm.incoming_tx.clone();
7070
let outgoing_rx = comm.outgoing_rx.clone();
7171
r_task(|| {
72-
let test_env_view = RObject::view(*test_env);
72+
let test_env_view = RObject::view(test_env.sexp);
7373
REnvironment::start(test_env_view, comm.clone(), comm_manager_tx.clone());
7474
});
7575

@@ -90,7 +90,7 @@ fn test_environment_list() {
9090
// variables with the new variable in it.
9191
r_task(|| unsafe {
9292
let sym = r_symbol!("everything");
93-
Rf_defineVar(sym, Rf_ScalarInteger(42), *test_env);
93+
Rf_defineVar(sym, Rf_ScalarInteger(42), test_env.sexp);
9494
});
9595

9696
// Request that the environment be refreshed
@@ -122,7 +122,7 @@ fn test_environment_list() {
122122

123123
// Create another variable
124124
r_task(|| unsafe {
125-
r_envir_set("nothing", Rf_ScalarInteger(43), *test_env);
125+
r_envir_set("nothing", Rf_ScalarInteger(43), test_env.sexp);
126126
r_envir_remove("everything", test_env.sexp);
127127
});
128128

@@ -173,17 +173,17 @@ fn test_environment_list() {
173173

174174
// test the env is now empty
175175
r_task(|| unsafe {
176-
let contents = RObject::new(R_lsInternal(*test_env, Rboolean_TRUE));
176+
let contents = RObject::new(R_lsInternal(test_env.sexp, Rboolean_TRUE));
177177
assert_eq!(Rf_length(*contents), 0);
178178
});
179179

180180
// Create some more variables
181181
r_task(|| unsafe {
182182
let sym = r_symbol!("a");
183-
Rf_defineVar(sym, Rf_ScalarInteger(42), *test_env);
183+
Rf_defineVar(sym, Rf_ScalarInteger(42), test_env.sexp);
184184

185185
let sym = r_symbol!("b");
186-
Rf_defineVar(sym, Rf_ScalarInteger(43), *test_env);
186+
Rf_defineVar(sym, Rf_ScalarInteger(43), test_env.sexp);
187187
});
188188

189189
// Simulate a prompt signal

0 commit comments

Comments
 (0)