mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-30 16:17:02 +01:00
gpgscm: Improve parsing.
* tests/gpgscm/scheme.c (port_increment_current_line): Avoid creating the same integer if the delta is zero. This happens a lot during parsing, and puts pressure on the memory allocator. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
058c97f9fc
commit
e4583ae14e
@ -1735,6 +1735,9 @@ port_clear_location (scheme *sc, port *p)
|
||||
static void
|
||||
port_increment_current_line (scheme *sc, port *p, long delta)
|
||||
{
|
||||
if (delta == 0)
|
||||
return;
|
||||
|
||||
p->curr_line =
|
||||
mk_integer(sc, ivalue_unchecked(p->curr_line) + delta);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user