Skip to content

Commit 436cb64

Browse files
author
maechler
committed
error msg: add an for consistency
git-svn-id: https://svn.r-project.org/R/trunk@88131 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent c5130ef commit 436cb64

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/library/base/po/R.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ msgstr ""
11771177

11781178
#: src/main/attrib.c:363
11791179
#, c-format
1180-
msgid "cannot set attribute on a '%s'"
1180+
msgid "cannot set an attribute on a '%s'"
11811181
msgstr ""
11821182

11831183
#: src/main/attrib.c:415

src/main/attrib.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -355,12 +355,12 @@ static SEXP installAttrib(SEXP vec, SEXP name, SEXP val)
355355

356356
switch(TYPEOF(vec)) {
357357
case CHARSXP:
358-
error("cannot set attribute on a CHARSXP");
358+
error("cannot set an attribute on a CHARSXP");
359359
break;
360360
case SYMSXP:
361361
case BUILTINSXP:
362362
case SPECIALSXP:
363-
error(_("cannot set attribute on a '%s'"), R_typeToChar(vec));
363+
error(_("cannot set an attribute on a '%s'"), R_typeToChar(vec));
364364
default:
365365
break;
366366
}
@@ -392,7 +392,7 @@ static SEXP removeAttrib(SEXP vec, SEXP name)
392392
{
393393
SEXP t;
394394
if(TYPEOF(vec) == CHARSXP)
395-
error("cannot set attribute on a CHARSXP");
395+
error("cannot set an attribute on a CHARSXP");
396396
if (name == R_NamesSymbol && isPairList(vec)) {
397397
for (t = vec; t != R_NilValue; t = CDR(t))
398398
SET_TAG(t, R_NilValue);
@@ -1639,9 +1639,7 @@ attribute_hidden SEXP do_attrgets(SEXP call, SEXP op, SEXP args, SEXP env)
16391639
return obj;
16401640
}
16411641
else { // attr(obj, "name") <- value :
1642-
SEXP argList;
16431642
static SEXP do_attrgets_formals = NULL;
1644-
16451643
obj = CAR(args);
16461644
if (MAYBE_SHARED(obj) ||
16471645
((! IS_ASSIGNMENT_CALL(call)) && MAYBE_REFERENCED(obj)))
@@ -1653,9 +1651,8 @@ attribute_hidden SEXP do_attrgets(SEXP call, SEXP op, SEXP args, SEXP env)
16531651
if (do_attrgets_formals == NULL)
16541652
do_attrgets_formals = allocFormalsList3(install("x"), install("which"),
16551653
install("value"));
1656-
argList = matchArgs_NR(do_attrgets_formals, args, call);
1654+
SEXP argList = matchArgs_NR(do_attrgets_formals, args, call);
16571655
PROTECT(argList);
1658-
16591656
SEXP name = CADR(argList);
16601657
SEXP val = CADDR(argList);
16611658
if (!isValidString(name) || STRING_ELT(name, 0) == NA_STRING)

0 commit comments

Comments
 (0)