aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2002-10-17 21:16:12 +0000
committerDavid Carlton <carlton@bactrian.org>2002-10-17 21:16:12 +0000
commit63ca651f75ebaa245c6277dbf6a7398b70b05806 (patch)
treea43c99baed2dedea621c6b3580cfb914a0315264 /gdb/symfile.c
parentabe1a5d0efb706925b171e04e3b11398c01ad3e0 (diff)
downloadgdb-63ca651f75ebaa245c6277dbf6a7398b70b05806.zip
gdb-63ca651f75ebaa245c6277dbf6a7398b70b05806.tar.gz
gdb-63ca651f75ebaa245c6277dbf6a7398b70b05806.tar.bz2
2002-10-09 David Carlton <carlton@math.stanford.edu>
* symfile.h: Add opaque declaration for struct obstack. Declare obsavestring to take a const char *. * symfile.c (obsavestring): Make first argument a const char *.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 6b702a3..28c84f9 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -299,16 +299,16 @@ sort_symtab_syms (register struct symtab *s)
may be part of a larger string and we are only saving a substring. */
char *
-obsavestring (char *ptr, int size, struct obstack *obstackp)
+obsavestring (const char *ptr, int size, struct obstack *obstackp)
{
register char *p = (char *) obstack_alloc (obstackp, size + 1);
/* Open-coded memcpy--saves function call time. These strings are usually
short. FIXME: Is this really still true with a compiler that can
inline memcpy? */
{
- register char *p1 = ptr;
+ register const char *p1 = ptr;
register char *p2 = p;
- char *end = ptr + size;
+ const char *end = ptr + size;
while (p1 != end)
*p2++ = *p1++;
}