[Rd] Wrong object type produced - LANGSXP should be LISTSXP (PR#7055)

From: <bauerda_at_ieee.org>
Date: Wed 07 Jul 2004 - 04:25:07 EST


Full_Name: David Bauer
Version: 1.9
OS: Linux
Submission from: (NULL) (160.91.245.8)

In the file gram.y, the xxsubscript function generates a LANGSXP with another LANGSXP as its CDR. I believe that this is a mistake and that the second LANGSXP should be a LISTSXP. The inputs a1, a3 are parameters to the subscript function (a2), and as such they should be in a dotted-pair list.

David Bauer

 static SEXP xxsubscript(SEXP a1, SEXP a2, SEXP a3)  {

     SEXP ans;
     if (GenerateCode)
-       PROTECT(ans = LCONS(a2, LCONS(a1, CDR(a3))));
+       PROTECT(ans = LCONS(a2, CONS(a1, CDR(a3))));
     else
        PROTECT(ans = R_NilValue);
     UNPROTECT_PTR(a3);
     UNPROTECT_PTR(a1);
     return ans;

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel Received on Wed Jul 07 07:37:06 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 08:59:07 EST