From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4744 invoked by alias); 2 Feb 2011 17:00:20 -0000 Received: (qmail 4731 invoked by uid 22791); 2 Feb 2011 17:00:18 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Feb 2011 17:00:13 +0000 Received: (qmail 26233 invoked from network); 2 Feb 2011 17:00:11 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Feb 2011 17:00:11 -0000 From: Pedro Alves To: Daniel Jacobowitz Subject: Re: Don't assume order of xml attributes Date: Wed, 02 Feb 2011 17:00:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic; KDE/4.5.1; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <201102021619.36863.pedro@codesourcery.com> <20110202163343.GA9355@caradoc.them.org> In-Reply-To: <20110202163343.GA9355@caradoc.them.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102021700.13675.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00019.txt.bz2 On Wednesday 02 February 2011 16:33:52, Daniel Jacobowitz wrote: > This was not required. The attributes don't have to be ordered in the > XML file, but they're ordered in the VEC because we create it that way > in gdb_start_element. You can tell your patch still relies on this > code because the calls to the lookup function mostly don't check for > NULL. Ah! Thanks for pointing it out. I completely missed it. > > That said, I don't think a linear search for attribute names is going > to be too slow :-) One would hope. :-) > So this is a nice readability improvement anyway. Yeah, I agree. I'll keep it in then. Thanks, -- Pedro Alves