message: Intern file names in msg_location to make them cheaper to copy.
[pspp] / src / language / stats / matrix.c
index 473cec585a29c77bb27f7d0b1f782774407ef7bd..ff3c792e7ee882c615850a01d20b7261f0fd283b 100644 (file)
@@ -49,6 +49,7 @@
 #include "libpspp/compiler.h"
 #include "libpspp/hmap.h"
 #include "libpspp/i18n.h"
+#include "libpspp/intern.h"
 #include "libpspp/misc.h"
 #include "libpspp/str.h"
 #include "libpspp/string-array.h"
@@ -6156,7 +6157,7 @@ parse_error (const struct dfm_reader *reader, enum fmt_type format,
   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,