Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: LC_NUMERIC=fr_FR and floating point arithmetics
- X-seq: zsh-workers 18342
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Philippe Troin <phil@xxxxxxxx>
- Subject: Re: LC_NUMERIC=fr_FR and floating point arithmetics
- Date: Wed, 12 Mar 2003 09:30:16 +0100
- Cc: Zsh workers <zsh-workers@xxxxxxxxxx>
- In-reply-to: <87bs0hdzuw.fsf@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20030224184502.A9922@xxxxxxxxxxxxxxxxxx> <1556.1047286700@xxxxxxxxxxxxxxxxxxxx> <20030310192526.GA15858@xxxxxxxx> <16574.1047378921@xxxxxxxxxxxxxxxxxxxx> <87bs0hdzuw.fsf@xxxxxxxxxxxxxxxx>
Philippe Troin wrote:
>
> Aren't you leaking a copy of the current locale (via dupstring())
> every time?
dupstring() calls zhalloc() to allocate memory instead of zalloc()
(unlike ztrdup()). So the memory should be freed the next time popheap()
is called (which I think is done for each command line). The comment at
the top of mem.c is what I'm basing this on. So I've always assumed that
zalloc should only be used for things which need to persist from one
command to the next, where realloc() is needed or where a large chunk of
memory is needed.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author