Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5A1C4D5B9 for ; Tue, 4 Dec 2012 17:05:25 +0000 (UTC) Received: (qmail 75617 invoked by uid 500); 4 Dec 2012 17:05:24 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 75166 invoked by uid 500); 4 Dec 2012 17:05:17 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 74428 invoked by uid 99); 4 Dec 2012 17:05:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2012 17:05:16 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [194.214.158.102] (HELO smtp-3.ensmp.fr) (194.214.158.102) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2012 17:05:07 +0000 Received: from cri.ensmp.fr (226.26.219.88.rev.sfr.net [88.219.26.226]) (authenticated bits=0) by smtp-3.ensmp.fr (8.14.5/8.14.3/JMMC-11/Mar/2010) with ESMTP id qB4H4fNn024312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 4 Dec 2012 18:04:45 +0100 (MET) Date: Tue, 4 Dec 2012 18:04:39 +0100 (CET) From: fabien@apache.org X-X-Sender: fabien@localhost6.localdomain6 To: APACHE development mailing list Subject: Re: 3 questions about inclusion of mod_macro into apache In-Reply-To: <201212032301.57606.sf@sfritsch.de> Message-ID: References: <201212032301.57606.sf@sfritsch.de> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at cascavel with ID 50BE2D29.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Auth: USER-ID coelho X-j-chkmail-Enveloppe: 50BE2D29.000 from 226.26.219.88.rev.sfr.net/226.26.219.88.rev.sfr.net/88.219.26.226/cri.ensmp.fr/ X-Virus-Checked: Checked by ClamAV on apache.org Dear Stephan, Thank you for your answer. If anyone want to look at the latest source, tell me and I'll make the current "dev" version available. I've switched to using a hash table instead of an array to store macros, and I have started cleaning up the code to remove traces which dated from apache 1.3 and seem not to be required anymore. > If a module, then modules/core, IMHO. Ok. >> * option "util": Move/merge string array processing stuff into >> "server/util.c". This is used when expanding a macro, and could be >> useful to someone else. > > I think the -c/-C command line handling does something similar (see > arr_elts_getstr() and friends in server/config.c). If these can be > merged with mod_macro's functions, then that would be nice. Yes, that is basically what I had in mind, but I have to check the fine details before merging anything. > Lazy initialization has the advantage of using less memory if no Macro > is used. That's especially true if we put Macro into the core. But I > will need to do some source reading before I have any informed opinion > on this. Yep. The memory is really a hash table in a temporary pool. > We could also start with "MU" (which looks like less work initially) > and then see how things work out. An advantage to a separate module is > the separately configurable LogLevel. But as I don't use mod_macro, I > don't know if that is important. I do not think that it is important. > [...] Warning directive. > Yes, seems useful and is small. Put it into core. Sounds reasonnable. >> *** Question 3: would it make sense to add the ability to remove a >> macro? I'm not sure that it is useful, as a macro can be >> overwritten, but it would look more complete that way. That could >> be "UndefMacro xxx" or something similar. > > I don't see any need for that. If there is a use case, then yes. I do not really have a use case, but users have more imagination than me. Without UndefMacro, it can lead to warnings on redefinitions that could be considered noisy and could not be removed. -- Fabien.