Skip to content

Commit 1e7137c

Browse files
author
ripley
committed
Rboolean issues
git-svn-id: https://svn.r-project.org/R/trunk@87834 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 2334645 commit 1e7137c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/main/memory.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ void R_RunWeakRefFinalizer(SEXP w)
15141514
SET_READY_TO_FINALIZE(w); /* insures removal from list on next gc */
15151515
PROTECT(key);
15161516
PROTECT(fun);
1517-
int oldintrsusp = R_interrupts_suspended;
1517+
Rboolean oldintrsusp = R_interrupts_suspended;
15181518
R_interrupts_suspended = TRUE;
15191519
if (isCFinalizer(fun)) {
15201520
/* Must be a C finalizer. */
@@ -1662,7 +1662,7 @@ attribute_hidden SEXP do_regFinaliz(SEXP call, SEXP op, SEXP args, SEXP rho)
16621662
if(onexit == NA_LOGICAL)
16631663
error(_("third argument must be 'TRUE' or 'FALSE'"));
16641664

1665-
R_RegisterFinalizerEx(CAR(args), CADR(args), onexit);
1665+
R_RegisterFinalizerEx(CAR(args), CADR(args), (Rboolean) onexit);
16661666
return R_NilValue;
16671667
}
16681668

@@ -2061,7 +2061,7 @@ attribute_hidden SEXP do_gctorture2(SEXP call, SEXP op, SEXP args, SEXP rho)
20612061
checkArity(op, args);
20622062
gap = asInteger(CAR(args));
20632063
wait = asInteger(CADR(args));
2064-
inhibit = asLogical(CADDR(args));
2064+
inhibit = asRbool(CADDR(args), call);
20652065
R_gc_torture(gap, wait, inhibit);
20662066

20672067
return ScalarInteger(old);
@@ -3120,7 +3120,7 @@ attribute_hidden SEXP do_gctime(SEXP call, SEXP op, SEXP args, SEXP env)
31203120
gctime_enabled = TRUE;
31213121
else {
31223122
check1arg(args, call, "on");
3123-
gctime_enabled = asLogical(CAR(args));
3123+
gctime_enabled = asRbool(CAR(args), call);
31243124
}
31253125
ans = allocVector(REALSXP, 5);
31263126
REAL(ans)[0] = gctimes[0];
@@ -4759,10 +4759,10 @@ Rboolean Rf_isString(SEXP s) { return isString(CHK(s)); }
47594759
Rboolean Rf_isObject(SEXP s) { return isObject(CHK(s)); }
47604760

47614761
/* Bindings accessors */
4762-
Rboolean attribute_hidden
4763-
(IS_ACTIVE_BINDING)(SEXP b) {return IS_ACTIVE_BINDING(CHK(b));}
4764-
Rboolean attribute_hidden
4765-
(BINDING_IS_LOCKED)(SEXP b) {return BINDING_IS_LOCKED(CHK(b));}
4762+
attribute_hidden Rboolean
4763+
(IS_ACTIVE_BINDING)(SEXP b) {return (Rboolean) IS_ACTIVE_BINDING(CHK(b));}
4764+
attribute_hidden Rboolean
4765+
(BINDING_IS_LOCKED)(SEXP b) {return (Rboolean) BINDING_IS_LOCKED(CHK(b));}
47664766
attribute_hidden void
47674767
(SET_ACTIVE_BINDING_BIT)(SEXP b) {SET_ACTIVE_BINDING_BIT(CHK(b));}
47684768
attribute_hidden void (LOCK_BINDING)(SEXP b) {LOCK_BINDING(CHK(b));}
@@ -4773,20 +4773,20 @@ void (SET_BASE_SYM_CACHED)(SEXP b) { SET_BASE_SYM_CACHED(CHK(b)); }
47734773
attribute_hidden
47744774
void (UNSET_BASE_SYM_CACHED)(SEXP b) { UNSET_BASE_SYM_CACHED(CHK(b)); }
47754775
attribute_hidden
4776-
Rboolean (BASE_SYM_CACHED)(SEXP b) { return BASE_SYM_CACHED(CHK(b)); }
4776+
Rboolean (BASE_SYM_CACHED)(SEXP b) { return (Rboolean) BASE_SYM_CACHED(CHK(b)); }
47774777

47784778
attribute_hidden
47794779
void (SET_SPECIAL_SYMBOL)(SEXP b) { SET_SPECIAL_SYMBOL(CHK(b)); }
47804780
attribute_hidden
47814781
void (UNSET_SPECIAL_SYMBOL)(SEXP b) { UNSET_SPECIAL_SYMBOL(CHK(b)); }
4782-
attribute_hidden
4783-
Rboolean (IS_SPECIAL_SYMBOL)(SEXP b) { return IS_SPECIAL_SYMBOL(CHK(b)); }
4782+
attribute_hidden // this is a bit returned in an int, so really is Rboolean
4783+
Rboolean (IS_SPECIAL_SYMBOL)(SEXP b) { return (Rboolean) IS_SPECIAL_SYMBOL(CHK(b)); }
47844784
attribute_hidden
47854785
void (SET_NO_SPECIAL_SYMBOLS)(SEXP b) { SET_NO_SPECIAL_SYMBOLS(CHK(b)); }
47864786
attribute_hidden
47874787
void (UNSET_NO_SPECIAL_SYMBOLS)(SEXP b) { UNSET_NO_SPECIAL_SYMBOLS(CHK(b)); }
4788-
attribute_hidden
4789-
Rboolean (NO_SPECIAL_SYMBOLS)(SEXP b) { return NO_SPECIAL_SYMBOLS(CHK(b)); }
4788+
attribute_hidden // // this is a bit returned in an int,
4789+
Rboolean (NO_SPECIAL_SYMBOLS)(SEXP b) { return (Rboolean) NO_SPECIAL_SYMBOLS(CHK(b)); }
47904790

47914791
/* R_FunTab accessors, only needed when write barrier is on */
47924792
/* Might want to not hide for experimentation without rebuilding R - LT */

0 commit comments

Comments
 (0)