message: Intern file names in msg_location to make them cheaper to copy.
[pspp] / src / language / data-io / matrix-data.c
index bffdd92cb7f463d0183181196b9e920f7e1a2fe9..31d6b710b0ba68a54402d33e50e559b9f581bf2e 100644 (file)
@@ -39,6 +39,7 @@
 #include "language/lexer/variable-parser.h"
 #include "libpspp/assertion.h"
 #include "libpspp/i18n.h"
+#include "libpspp/intern.h"
 #include "libpspp/message.h"
 #include "libpspp/str.h"
 
@@ -253,7 +254,7 @@ parse_msg (struct dfm_reader *reader, const struct substring *token,
   int line_number = dfm_get_line_number (reader);
   struct msg_location *location = xmalloc (sizeof *location);
   *location = (struct msg_location) {
-    .file_name = xstrdup (dfm_get_file_name (reader)),
+    .file_name = intern_new (dfm_get_file_name (reader)),
     .first_line = line_number,
     .last_line = line_number + 1,
     .first_column = first_column,