Skip to content

Commit d8dfa06

Browse files
author
luke
committed
Drop use of memory profiling in model.c when barrier checking.
git-svn-id: https://svn.r-project.org/R/trunk@88802 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 906ef7a commit d8dfa06

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/library/stats/src/model.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,8 @@ SEXP modelmatrix(SEXP call, SEXP op, SEXP args, SEXP rho)
674674
PROTECT(x = allocMatrix(REALSXP, n, nc));
675675
double *rx = REAL(x);
676676

677-
#ifdef R_MEMORY_PROFILING
677+
#if defined(R_MEMORY_PROFILING) && defined(USE_RINTERNALS)
678+
// RTRACE and SET_RTRACE macros are only available with USE_RINTERNALS
678679
if (RTRACE(vars)){
679680
memtrace_report(vars, x);
680681
SET_RTRACE(x, 1);
@@ -696,7 +697,9 @@ SEXP modelmatrix(SEXP call, SEXP op, SEXP args, SEXP rho)
696697
if (INTEGER(columns)[i] == 0)
697698
continue;
698699
var_i = VECTOR_ELT(variable, i);
699-
#ifdef R_MEMORY_PROFILING
700+
#if defined(R_MEMORY_PROFILING) && defined(USE_RINTERNALS)
701+
// RTRACE and SET_RTRACE macros are only available with
702+
// USE_RINTERNALS
700703
if (RTRACE(var_i)){
701704
memtrace_report(var_i, x);
702705
SET_RTRACE(x, 1);

0 commit comments

Comments
 (0)