mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
uniqstr wasn't being used for handle_syncline like it should.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
|
||||
|
||||
* src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
|
||||
|
||||
* src/location.h (struct): The file member is a uniqstr.
|
||||
(equal_boundaries): Use UNIQSTR_EQ for comparison.
|
||||
|
||||
2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Fix bug with non-%union parsers that have printers or destructors,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Locations for Bison
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -21,11 +21,13 @@
|
||||
#ifndef LOCATION_H_
|
||||
# define LOCATION_H_
|
||||
|
||||
# include "uniqstr.h"
|
||||
|
||||
/* A boundary between two characters. */
|
||||
typedef struct
|
||||
{
|
||||
/* The name of the file that contains the boundary. */
|
||||
char const *file;
|
||||
uniqstr file;
|
||||
|
||||
/* The (origin-1) line that contains the boundary. */
|
||||
int line;
|
||||
@@ -42,7 +44,7 @@ equal_boundaries (boundary a, boundary b)
|
||||
{
|
||||
return (a.column == b.column
|
||||
&& a.line == b.line
|
||||
&& a.file == b.file);
|
||||
&& UNIQSTR_EQ (a.file, b.file));
|
||||
}
|
||||
|
||||
/* A location, that is, a region of source code. */
|
||||
|
||||
@@ -1003,7 +1003,7 @@ handle_syncline (char *args)
|
||||
const char *file = NULL;
|
||||
file = strchr (args, '"') + 1;
|
||||
*strchr (file, '"') = 0;
|
||||
scanner_cursor.file = current_file = xstrdup (file);
|
||||
scanner_cursor.file = current_file = uniqstr_new (file);
|
||||
scanner_cursor.line = lineno;
|
||||
scanner_cursor.column = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user