(scm_lreadr): use scm_c_substring_read_only for string
authorMarius Vollmer <mvo@zagadka.de>
Wed, 22 Sep 2004 13:55:15 +0000 (13:55 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Wed, 22 Sep 2004 13:55:15 +0000 (13:55 +0000)
literals, thus making them read-only as specified by R5RS.

libguile/read.c

index 0e5aee3..fa3f958 100644 (file)
@@ -599,7 +599,7 @@ scm_lreadr (SCM *tok_buf, SCM port, SCM *copy)
        }
       if (j == 0)
        return scm_nullstr;
-      return scm_c_substring_copy (*tok_buf, 0, j);
+      return scm_c_substring_read_only (*tok_buf, 0, j);
 
     case '0': case '1': case '2': case '3': case '4':
     case '5': case '6': case '7': case '8': case '9':