zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Jun T <takimoto-j@kba.biglobe.ne.jp>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH 1/2] Consolidated nofork substitution changes
Date: Fri, 22 Sep 2023 19:25:52 -0500	[thread overview]
Message-ID: <CAH+w=7Y3VfxuZDfSF4O05nxLFRVyvoCBBZnW0dePGBQhKe2LbA@mail.gmail.com> (raw)
In-Reply-To: <071C3F0A-AE0B-4040-88FA-9E841981EDB1@kba.biglobe.ne.jp>

On Thu, Sep 21, 2023 at 11:32 PM Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:
>
> > 2023/09/22 13:16, Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:
> >
> > -                 setsparam("REPLY", cmdarg);
> > +                 setsparam("REPLY", metafy(cmdarg, -1, META_HREALLOC));
>
> Sorry, we should use META_REALLOC.

I think this.

diff --git a/Src/subst.c b/Src/subst.c
index dc2052ee0..f37ae935e 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2003,11 +2003,12 @@ paramsubst(LinkList l, LinkNode n, char **str,
int qt, int pf_flags,
         } else    /* parse error */
         errflag |= ERRFLAG_ERROR;
         if (rplytmp && !errflag) {
-        int onoerrs = noerrs;
+        int onoerrs = noerrs, rplylen;
         noerrs = 2;
-        if ((cmdarg = ztuff(rplytmp)))
-            setsparam("REPLY", cmdarg);
+        rplylen = zstuff(&cmdarg, rplytmp);
         noerrs = onoerrs;
+        if (rplylen >= 0)
+            setsparam("REPLY", metafy(cmdarg, rplylen, META_REALLOC));
         }
     }


  reply	other threads:[~2023-09-23  0:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-16 22:20 Bart Schaefer
2023-09-22  4:16 ` Jun T
2023-09-22  4:32   ` Jun T
2023-09-23  0:25     ` Bart Schaefer [this message]
2023-09-23  1:41       ` Jun. T
2023-09-23  2:01         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Y3VfxuZDfSF4O05nxLFRVyvoCBBZnW0dePGBQhKe2LbA@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).