Skip to content

Commit 89facf7

Browse files
author
ripley
committed
0 was being used for Rboolaen FALSE
git-svn-id: https://svn.r-project.org/R/trunk@87909 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent a063741 commit 89facf7

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

src/include/Defn.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
# define USE_RINTERNALS
5252
#endif
5353

54+
// should really include R_ext/Visibility.h
5455
#ifdef HAVE_VISIBILITY_ATTRIBUTE
5556
# define attribute_visible __attribute__ ((visibility ("default")))
5657
# define attribute_hidden __attribute__ ((visibility ("hidden")))

src/main/coerce.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ static SEXP coercePairList(SEXP v, SEXPTYPE type)
977977
if (isString(CAR(vp)) && length(CAR(vp)) == 1)
978978
SET_STRING_ELT(rval, i, STRING_ELT(CAR(vp), 0));
979979
else
980-
SET_STRING_ELT(rval, i, STRING_ELT(deparse1line(CAR(vp), 0), 0));
980+
SET_STRING_ELT(rval, i, STRING_ELT(deparse1line(CAR(vp), false), 0));
981981
}
982982
}
983983
else if (type == VECSXP) {
@@ -1084,7 +1084,7 @@ static SEXP coerceVectorList(SEXP v, SEXPTYPE type)
10841084
else
10851085
SET_STRING_ELT(rval, i,
10861086
STRING_ELT(deparse1line_ex(VECTOR_ELT(v, i),
1087-
0, NICE_NAMES),
1087+
false, NICE_NAMES),
10881088
0));
10891089
}
10901090
}
@@ -1248,7 +1248,7 @@ SEXP coerceVector(SEXP v, SEXPTYPE type)
12481248
if (isString(CAR(vp)) && length(CAR(vp)) == 1)
12491249
SET_STRING_ELT(ans, i, STRING_ELT(CAR(vp), 0));
12501250
else
1251-
SET_STRING_ELT(ans, i, STRING_ELT(deparse1line(CAR(vp), 0), 0));
1251+
SET_STRING_ELT(ans, i, STRING_ELT(deparse1line(CAR(vp), false), 0));
12521252
}
12531253
UNPROTECT(1); /* ans */
12541254
break;
@@ -1323,7 +1323,7 @@ attribute_hidden SEXP CreateTag(SEXP x)
13231323
&& length(STRING_ELT(x, 0)) >= 1) {
13241324
x = installTrChar(STRING_ELT(x, 0));
13251325
} else
1326-
x = installTrChar(STRING_ELT(deparse1(x, 1, SIMPLEDEPARSE), 0));
1326+
x = installTrChar(STRING_ELT(deparse1(x, true, SIMPLEDEPARSE), 0));
13271327
return x;
13281328
}
13291329

src/main/errors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ static void vwarningcall_dflt(SEXP call, const char *format, va_list ap)
493493
else if(w == 1) { /* print as they happen */
494494
char *tr;
495495
if( call != R_NilValue ) {
496-
dcall = CHAR(STRING_ELT(deparse1s(call), 0));
496+
dcall = CHAR(STRING_ELT(deparse1s(call), false));
497497
} else dcall = "";
498498
psize = min(BUFSIZE, R_WarnLength+1);
499499
pval = Rvsnprintf_mbcs(buf, psize, format, ap);

src/main/print.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static void PrintLanguage(SEXP s, R_PrintData *data)
176176
t = eval(t, R_BaseEnv);
177177
UNPROTECT(1);
178178
} else {
179-
t = deparse1w(s, 0, data->useSource | DEFAULTDEPARSE);
179+
t = deparse1w(s, false, data->useSource | DEFAULTDEPARSE);
180180
R_print = *data; /* Deparsing calls PrintDefaults() */
181181
}
182182
PROTECT(t);
@@ -773,7 +773,7 @@ static void PrintExpression(SEXP s, R_PrintData *data)
773773
SEXP u;
774774
int i, n;
775775

776-
u = PROTECT(deparse1w(s, 0, data->useSource | DEFAULTDEPARSE));
776+
u = PROTECT(deparse1w(s, false, data->useSource | DEFAULTDEPARSE));
777777
R_print = *data; /* Deparsing calls PrintDefaults() */
778778

779779
n = LENGTH(u);
@@ -804,7 +804,7 @@ static void PrintSpecial(SEXP s, R_PrintData *data)
804804
if(s2 != R_UnboundValue) {
805805
SEXP t;
806806
PROTECT(s2);
807-
t = deparse1m(s2, 0, DEFAULTDEPARSE); // or deparse1() ?
807+
t = deparse1m(s2, false, DEFAULTDEPARSE); // or deparse1() ?
808808
R_print = *data; /* Deparsing calls PrintDefaults() */
809809

810810
Rprintf("%s ", CHAR(STRING_ELT(t, 0))); /* translated */
@@ -871,7 +871,7 @@ attribute_hidden void PrintValueRec(SEXP s, R_PrintData *data)
871871
break;
872872
case SYMSXP:
873873
/* Use deparse here to handle backtick quotification of "weird names". */
874-
t = deparse1(s, 0, SIMPLEDEPARSE); // TODO ? rather deparse1m()
874+
t = deparse1(s, false, SIMPLEDEPARSE); // TODO ? rather deparse1m()
875875
R_print = *data; /* Deparsing calls PrintDefaults() */
876876
Rprintf("%s\n", CHAR(STRING_ELT(t, 0))); /* translated */
877877
break;

src/main/relop.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ attribute_hidden SEXP do_relop_dflt(SEXP call, SEXP op, SEXP x, SEXP y)
272272
SEXP tmp = allocVector(STRSXP, 1);
273273
PROTECT(tmp);
274274
SET_STRING_ELT(tmp, 0, (iS) ? PRINTNAME(x) :
275-
STRING_ELT(deparse1line_ex(x, 0,
275+
STRING_ELT(deparse1line_ex(x, false,
276276
DEFAULTDEPARSE | DIGITS17),
277277
0));
278278
REPROTECT(x = tmp, xpi);
@@ -283,7 +283,7 @@ attribute_hidden SEXP do_relop_dflt(SEXP call, SEXP op, SEXP x, SEXP y)
283283
SEXP tmp = allocVector(STRSXP, 1);
284284
PROTECT(tmp);
285285
SET_STRING_ELT(tmp, 0, (iS) ? PRINTNAME(y) :
286-
STRING_ELT(deparse1line_ex(y, 0,
286+
STRING_ELT(deparse1line_ex(y, false,
287287
DEFAULTDEPARSE | DIGITS17),
288288
0));
289289
REPROTECT(y = tmp, ypi);

0 commit comments

Comments
 (0)