Re: [PATCH v2] Simplify alias storage.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 28, 2024 at 01:43:37AM +0100, Harald van Dijk wrote:
> 
> Rather than storing the alias name and value separately, we can reduce
> simplify code and reduce code size by storing them in name=value form.
> This allows us to re-use some code from var.c to handle hashing and
> comparisons, so long as we update that to account for aliases' special
> handling of a leading = character. This is okay to do for variables as
> well, as for variables the leading character is guaranteed to not be =.
> ---
>  src/alias.c | 32 ++++++++++----------------------
>  src/input.c |  4 ++--
>  src/var.c   | 27 +++++++++++----------------
>  src/var.h   | 15 +++++++++++++++
>  4 files changed, 38 insertions(+), 40 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux