message: Intern file names in msg_location to make them cheaper to copy.
[pspp] / src / libpspp / message.h
index d403b696539a4eabe07e9c0a5e520a717d6c37f3..a99b0818e3438fd6514be202a46c3d6e0f6f8185 100644 (file)
@@ -74,7 +74,7 @@ msg_class_from_category_and_severity (enum msg_category category,
 
 struct msg_location
   {
-    char *file_name;            /* Name of file containing error, or NULL. */
+    const char *file_name;      /* Interned file name, or NULL. */
     int first_line;             /* 1-based line number, or 0 if none. */
     int last_line;              /* 1-based exclusive last line (0=none). */
     int first_column;           /* 1-based first column, or 0 if none. */
@@ -90,7 +90,7 @@ void msg_location_format (const struct msg_location *, struct string *);
 
 struct msg_stack
   {
-    struct msg_location location;
+    struct msg_location *location;
     char *description;
   };