File tree 2 files changed +10
-11
lines changed
2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -369,17 +369,6 @@ impl RMain {
369
369
panic ! ( "not testing" ) ;
370
370
}
371
371
372
- // In tests R may be run from various threads. This confuses R's stack
373
- // overflow checks so we disable those. This should not make it in
374
- // production builds as it causes stack overflows to crash R instead of
375
- // throwing an R error.
376
- if harp:: test:: IS_TESTING {
377
- panic ! ( "testing" ) ;
378
- unsafe {
379
- libr:: set ( libr:: R_CStackLimit , usize:: MAX ) ;
380
- }
381
- }
382
-
383
372
crate :: sys:: interface:: setup_r ( args) ;
384
373
385
374
libraries. initialize_post_setup_r ( ) ;
Original file line number Diff line number Diff line change @@ -68,6 +68,16 @@ pub fn setup_r(mut args: Vec<*mut c_char>) {
68
68
libr:: set ( ptr_R_Busy, Some ( r_busy) ) ;
69
69
libr:: set ( ptr_R_Suicide, Some ( r_suicide) ) ;
70
70
71
+ // In tests R may be run from various threads. This confuses R's stack
72
+ // overflow checks so we disable those. This should not make it in
73
+ // production builds as it causes stack overflows to crash R instead of
74
+ // throwing an R error.
75
+ if harp:: test:: IS_TESTING {
76
+ unsafe {
77
+ libr:: set ( libr:: R_CStackLimit , usize:: MAX ) ;
78
+ }
79
+ }
80
+
71
81
// Set up main loop
72
82
setup_Rmainloop ( ) ;
73
83
}
You can’t perform that action at this time.
0 commit comments