poke-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 04/12] libpoke/pvm.jitter: Use more `pvm_make_string_nodup`


From: Jose E. Marchesi
Subject: Re: [PATCH 04/12] libpoke/pvm.jitter: Use more `pvm_make_string_nodup`
Date: Thu, 27 May 2021 13:50:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

This is OK for both master and maint/poke-1.
Thanks!

> 2021-05-22  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
>
>       * libpoke/pvm.jitter (sconc): Replace `pvm_make_string` with
>       `pvm_make_string_nodup`.
>       (ctos): Likewise.
>       (substr): Likewise.
> ---
>  ChangeLog          | 7 +++++++
>  libpoke/pvm.jitter | 6 +++---
>  2 files changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index 15d858b0..8f04b03a 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,10 @@
> +2021-05-22  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
> +
> +     * libpoke/pvm.jitter (sconc): Replace `pvm_make_string` with
> +     `pvm_make_string_nodup`.
> +     (ctos): Likewise.
> +     (substr): Likewise.
> +
>  2021-05-22  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
>  
>       * libpoke/pvm.h (pvm_make_string_nodup): New function declaration.
> diff --git a/libpoke/pvm.jitter b/libpoke/pvm.jitter
> index 079d1c18..2ead1a7c 100644
> --- a/libpoke/pvm.jitter
> +++ b/libpoke/pvm.jitter
> @@ -3246,7 +3246,7 @@ instruction sconc ()
>       char *s = pvm_alloc (strlen (sa) + strlen (sb) + 1);
>       strcpy (s, sa);
>       strcat (s, sb);
> -     res = pvm_make_string (s);
> +     res = pvm_make_string_nodup (s);
>  
>       JITTER_PUSH_STACK (res);
>  #undef F
> @@ -3887,7 +3887,7 @@ instruction ctos ()
>      str[0] = c;
>      str[1] = '\0';
>  
> -    JITTER_PUSH_STACK (pvm_make_string (str));
> +    JITTER_PUSH_STACK (pvm_make_string_nodup (str));
>    end
>  end
>  
> @@ -4195,7 +4195,7 @@ instruction substr () # ( STR ULONG ULONG -- STR ULONG 
> ULONG STR )
>               slen);
>      s[slen] = '\0';
>  
> -    JITTER_PUSH_STACK (pvm_make_string (s));
> +    JITTER_PUSH_STACK (pvm_make_string_nodup (s));
>    end
>  end



reply via email to

[Prev in Thread] Current Thread [Next in Thread]