This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] macroexp, "small values for initial testing"


Thanks --- I've committed the following:

ChangeLog:
2007-08-05  Jim Blandy  <jimb@codesourcery.com>

      * macroexp.c (init_buffer): Remove testing code that overrides the
      caller's length guess.
      (gather_arguments): Use a larger initial size, now that the vector
      growth code has been exercised.

Index: macroexp.c
===================================================================
RCS file: /cvs/src/src/gdb/macroexp.c,v
retrieving revision 1.10
diff -u -r1.10 macroexp.c
--- macroexp.c  9 Jan 2007 17:58:52 -0000       1.10
+++ macroexp.c  5 Aug 2007 21:40:42 -0000
@@ -81,9 +81,6 @@
 static void
 init_buffer (struct macro_buffer *b, int n)
 {
-  /* Small value for initial testing.  */
-  n = 1;
-
   b->size = n;
   if (n > 0)
     b->text = (char *) xmalloc (n);
@@ -715,7 +712,7 @@
   get_token (&tok, src);
 
   args_len = 0;
-  args_size = 1;                /* small for initial testing */
+  args_size = 6;
   args = (struct macro_buffer *) xmalloc (sizeof (*args) * args_size);
 
   for (;;)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]