From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10350 invoked by alias); 23 Apr 2012 15:58:53 -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: X-Seq: 30445 Received: (qmail 18073 invoked from network); 23 Apr 2012 15:58:49 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Mon, 23 Apr 2012 16:27:11 +0100 From: Peter Stephenson To: "Zsh Hackers' List" Subject: MAX_ARRLEN Message-ID: <20120423162711.42a6bad1@pwslap01u.europe.root.pri> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.101.10.18] X-Scanned-By: MailControl 7.7.0 (www.mailcontrol.com) on 10.71.0.134 I've just hit MAX_ARRLEN. The array in question wasn't much larger than the limit and when I commented out the checks everything just worked fine. So it looks like an arbitrary limit isn't much use --- no great surprise, I don't think anyone here is a big fan of them. What's the right thing to do? There are various grades ranging from making it compilable out, through making it compile-time configurable with an option to compile out, through making it an option to have the check turned on, to having a variable that we check using getiparam() each time, to having a special variable so that we don't need to get it each time. I think the last option with a clearly named variable such as ZSH_MAX_ARRAY_LENGTH that can be set to 0 to turn it off is probably the best. -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog