summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2014-12-05 21:13:15 +0000
committerGary V. Vaughan <gary@gnu.org>2014-12-05 21:19:12 +0000
commitc320252821e5d9fd6f3a6c26bcc53730aae2a9e1 (patch)
treede7944e556a49bcbac66502ad60196d4fb8778df
parent312695e1ebb4e9807289f4b9d93b263a61a381a8 (diff)
downloadm4-c320252821e5d9fd6f3a6c26bcc53730aae2a9e1.tar.gz
obstacks: use obstack_blank_fast where possible.
In preparation for gnulib API change to obstacks, where obstack_blank cannot shrink memory use any more. * m4/macro.c (trace_flush): `start - len` can be negative, so call obstack_blank_fast, which accepts negative arguments. * modules/m4.c (m4_make_temp): Likewise... -1 is always negative! Signed-off-by: Gary V. Vaughan <gary@gnu.org>
-rw-r--r--m4/macro.c2
-rw-r--r--modules/m4.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/m4/macro.c b/m4/macro.c
index 85aa40bb..01f5f0f8 100644
--- a/m4/macro.c
+++ b/m4/macro.c
@@ -864,7 +864,7 @@ trace_flush (m4 *context, unsigned int start)
fwrite (&str[start], 1, len - start, file);
fputc ('\n', file);
}
- obstack_blank (&context->trace_messages, start - len);
+ obstack_blank_fast (&context->trace_messages, start - len);
}
/* Do pre-argument-collection tracing for the macro described in INFO.
diff --git a/modules/m4.c b/modules/m4.c
index 755bd885..ee973498 100644
--- a/modules/m4.c
+++ b/modules/m4.c
@@ -732,7 +732,7 @@ m4_make_temp (m4 *context, m4_obstack *obs, const m4_call_info *caller,
if (!dir)
close (fd);
/* Remove NUL, then finish quote. */
- obstack_blank (obs, -1);
+ obstack_blank_fast (obs, -1);
obstack_grow (obs, quotes->str2, quotes->len2);
}
}