From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22685 invoked by alias); 21 Jan 2018 17:43:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42310 Received: (qmail 8588 invoked by uid 1010); 21 Jan 2018 17:43:35 -0000 X-Qmail-Scanner-Diagnostics: from mail-pf0-f171.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.192.171):SA:0(-1.9/5.0):. Processed in 3.011652 secs); 21 Jan 2018 17:43:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject:cc :mime-version; bh=SV8IPxnGjjCnHzMD2uiIvl2QuS+zE5FS5e5I6Nxh6Kw=; b=KAaljeAh0ImC6S82aDqgFoEwxqfmzK8irnWckn//K69NwyaGgFtpC8u1PwccAKvzak iERbMZ7I5sxjUQPLkMDU53zIIoOlss+dCYlXZWugCbeao/bMGoeQJ4HeQiXkzjrL8z13 VBqp65RZEWX1qz3qLxk5hcwupv3BsUFRaK167kaD82oKbCLKi5BrMSi+FEKS4maI8irq aNXgmwo1lteJhJj0BwuG3CRx8xrLRY6MpW+lyqKQG+9NrVKgvOYc0BQZP3GShSR+HY9T gNZgwmCWT+Rs7vznilQruAvG7kIJG6sg0zqb10QG0G2rEyLi3M6hnhidtLYs4oTeT1k9 k5NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:cc:mime-version; bh=SV8IPxnGjjCnHzMD2uiIvl2QuS+zE5FS5e5I6Nxh6Kw=; b=h+KT/Vz9z5pPoGOqmok7bGS3uphr/evlfgZlcz4mMe4kIhOMIb1u7mBljCUXfCMya7 gJ0qSIXwx90kH1kcKrnt4nAwLD/fZ755rRsjWl0yjbQEK9UssjXGQmJxM78sR0QTApxY zzG0ovIYRw4pN0wWaE0AaR0QW6yrlqQz0DT4n8X5oyFdFGVvYlti89NGdpuOGCr0hMux tiMF6uF4tos8LI0j915lyvOkfkeUe3Zqo40Z489Z9Ylb42ZTgC5ft94brJInImzDXXCi 71WYNYl3bGMJIAZMRiRTehPpg6z9+Bu5SRUo0qRLMW7i85qjV3zAp6pT9yaZM0BjsTMk 4IDg== X-Gm-Message-State: AKwxyter/xORrRUa5jZYzXFHo1wy7ox28EyAcFOuxog4vThXm6O9kjrT yqASoCLk3sF66ghaQZP6OmGHjFc8 X-Google-Smtp-Source: AH8x225LWJ6AVi1nY9yhip/Fbqm3eVtnAFJIMExqBKjxYEVc0uIjZmlXQ1XNw6la50WElm+T3jbNfg== X-Received: by 10.98.212.26 with SMTP id a26mr5871511pfh.38.1516556609458; Sun, 21 Jan 2018 09:43:29 -0800 (PST) From: Bart Schaefer Message-Id: <180121094326.ZM11602@torch.brasslantern.com> Date: Sun, 21 Jan 2018 09:43:26 -0800 In-Reply-To: <20180121014758.lu7vt7qg4kuup5qd@gmail.com> Comments: In reply to Joey Pabalinas "Re: [PATCH] jp: fix segfaults during parameter expansion" (Jan 20, 3:47pm) References: <20180114060557.hmrvpg6t4rdebgv6@gmail.com> <180120160304.ZM12968@torch.brasslantern.com> <20180121014758.lu7vt7qg4kuup5qd@gmail.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org, zsh-workers@zsh.org Subject: Re: [PATCH] jp: fix segfaults during parameter expansion Cc: Joey Pabalinas MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 20, 3:47pm, Joey Pabalinas wrote: } } Incorpated your changes, although I feel like the conditional operator is } a better fit here (simpler and much more concise; making each possibility a } lone function call is one of the few uses of `?:` where the intent is } flat-out obvious). There's no reason to do both of these changes. You do the first one if you like the "reference used with array" error message, or you do the second one if you like the "not an identifier" message. The second one will never take the dupstring() branch if you have done the first.