Skip to content

Commit ae27d23

Browse files
committed
Improve naming a bit
1 parent d7dbc33 commit ae27d23

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/ark/src/interface.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ pub struct RMain {
272272
/// Set to true when `r_read_console()` exits. Reset to false at the start
273273
/// of each `r_read_console()` call. Used to detect if `eval()` returned
274274
/// from a nested REPL (the flag will be true when the evaluation returns).
275-
nested_read_console_returned: Cell<bool>,
275+
read_console_nested_return: Cell<bool>,
276276

277277
/// Set to true `r_read_console()` exits via an error longjump. Used to
278278
/// detect if we need to go return from `r_read_console()` with a dummy
@@ -742,7 +742,7 @@ impl RMain {
742742
debug_session_index: 1,
743743
pending_inputs: None,
744744
read_console_depth: Cell::new(0),
745-
nested_read_console_returned: Cell::new(false),
745+
read_console_nested_return: Cell::new(false),
746746
read_console_threw_error: Cell::new(false),
747747
read_console_next_input: Cell::new(None),
748748
read_console_frame: RefCell::new(RObject::new(unsafe { libr::R_GlobalEnv })),
@@ -2441,7 +2441,7 @@ pub extern "C-unwind" fn r_read_console(
24412441
// with the R REPL and force it to reset state
24422442

24432443
// - Reset flag that helps us figure out when a nested REPL returns
2444-
main.nested_read_console_returned.set(false);
2444+
main.read_console_nested_return.set(false);
24452445

24462446
// - Reset flag that helps us figure out when an error occurred and needs a
24472447
// reset of `R_EvalDepth` and friends
@@ -2467,7 +2467,7 @@ pub extern "C-unwind" fn r_read_console(
24672467
// Set flag so that parent read console, if any, can detect that a
24682468
// nested console returned (if it indeed returns instead of looping
24692469
// for another iteration)
2470-
main.nested_read_console_returned.set(true);
2470+
main.read_console_nested_return.set(true);
24712471

24722472
// Restore current frame
24732473
main.read_console_frame.replace(old_current_frame);
@@ -2507,7 +2507,7 @@ fn r_read_console_impl(
25072507
// Check if a nested read_console() just returned. If that's the
25082508
// case, we need to reset the `R_ConsoleIob` by first returning
25092509
// a dummy value causing a `PARSE_NULL` event.
2510-
if main.nested_read_console_returned.get() {
2510+
if main.read_console_nested_return.get() {
25112511
let next_input = RMain::console_input(buf, buflen);
25122512
main.read_console_next_input.set(Some(next_input));
25132513

@@ -2516,7 +2516,7 @@ fn r_read_console_impl(
25162516
// to interpret it as `n`, causing it to exit instead of
25172517
// being a no-op.
25182518
RMain::on_console_input(buf, buflen, String::from(" ")).unwrap();
2519-
main.nested_read_console_returned.set(false);
2519+
main.read_console_nested_return.set(false);
25202520
}
25212521

25222522
libr::Rf_unprotect(2);

0 commit comments

Comments
 (0)