Return-Path: Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Delivered-To: mailing list dev@apr.apache.org Received: (qmail 93244 invoked from network); 25 Nov 2000 00:48:13 -0000 Received: from goliath.cnchost.com (207.155.252.47) by locus.apache.org with SMTP; 25 Nov 2000 00:48:13 -0000 Received: from www1 (www1.rowe-clan.net [208.176.192.146] (may be forged)) by goliath.cnchost.com id TAA00731; Fri, 24 Nov 2000 19:48:03 -0500 (EST) [ConcentricHost SMTP Relay 1.10] Errors-To: From: "William A. Rowe, Jr." To: "'Greg Hudson'" , "'Greg Stein'" Cc: , Subject: RE: [PATCH] apr_getopt_long interface update and interleaving support Date: Fri, 24 Nov 2000 18:48:09 -0600 Message-ID: <000101c05679$62776fc0$92c0b0d0@roweclan.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: <200011250035.TAA11851@egyptian-gods.MIT.EDU> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Importance: Normal X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N > From: Greg Hudson [mailto:ghudson@MIT.EDU] > Sent: Friday, November 24, 2000 6:35 PM > > >> - char *const *argv; > >> + char **argv; > > > Um. I don't think we can do this with argv. I'm surprised that it > > isn't "const char * const * argv". > > We can do whatever we want with argv. That's pretty well-established. Yes. But you are making a critical flaw in your thinking :-) You assume we are dealing with argc/argv ... after that simmered for a second, realize other apr_getopt users will be processing other arrays of arrays, not only the main() args. > It wasn't "const char *const *argv" before because a "char **" > argument is not compatible with such a parameter, and C programs > canonically take "char **argv", not "const char *const *argv". I'm > not sure if it's even valid C to silently change from char * to const > char * without an explicit cast, which is what you'd be doing if you > wrote a main() which accepted a list of const char pointers intead of > a list of char pointers. Don't be silly, you can always pass a non-const value for a const arg. Same with silent promotions of int to long, etc.