From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by sourceware.org (Postfix) with ESMTPS id 295EB393C033 for ; Mon, 3 May 2021 15:18:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 295EB393C033 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dodji@seketeli.org Received: from localhost (unknown [88.120.130.27]) (Authenticated sender: dodji@seketeli.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id C2898100010; Mon, 3 May 2021 15:18:13 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 15B1B58000E; Mon, 3 May 2021 17:18:12 +0200 (CEST) From: Dodji Seketeli To: Giuliano Procida Cc: kernel-team@android.com, Giuliano Procida via Libabigail , Matthias =?utf-8?Q?M=C3=A4nnich?= Subject: Re: [PATCH 3/3] reader: Use xmlFirstElementChild/xmlNextElementSibling to iterate over children elements Organization: Me, myself and I References: <20210331092352.619148-1-gprocida@google.com> <20210331170454.951900-1-gprocida@google.com> <8735w3vdkv.fsf@seketeli.org> <87o8eftz5v.fsf_-_@seketeli.org> <87k0oytmsf.fsf@seketeli.org> <877dkytlqo.fsf_-_@seketeli.org> <8735vlthjm.fsf@seketeli.org> X-Operating-System: Fedora 34 X-URL: http://www.seketeli.net/~dodji Date: Mon, 03 May 2021 17:18:12 +0200 In-Reply-To: <8735vlthjm.fsf@seketeli.org> (Dodji Seketeli's message of "Tue, 20 Apr 2021 11:46:21 +0200") Message-ID: <87tunjsv63.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2021 15:18:19 -0000 Hello, [...] Dodji Seketeli a =C3=A9crit: > Hello Giuliano, > > Giuliano Procida a =C3=A9crit: > > >> I had a quick look and there's (at least) one place where there still a >> direct access to ->children. The code works because there are separate >> tests to not process wrong nodes, but it would be neater to use the first >> element child function uniformly (as well). > > You are right. > > Below is an update of that patch that hopefully addresses your comment. > > Thanks. > > From 0a6c322f6ec8be354122c6b4cdefe6143eb568ed Mon Sep 17 00:00:00 2001 > From: Dodji Seketeli > Date: Mon, 19 Apr 2021 13:50:33 +0200 > Subject: [PATCH 3/3] reader: Use xmlFirstElementChild/xmlNextElementSibli= ng to > iterate over children elements > > Use xmlFirstElementChild/xmlNextElementSibling to iterate over element > children nodes rather than doing it by hand in the various for loops. > > * src/abg-reader.cc (walk_xml_node_to_map_type_ids) > (read_translation_unit, read_translation_unit_from_input) > (read_symbol_db_from_input, build_needed) > (read_elf_needed_from_input, read_corpus_group_from_input) > (build_namespace_decl, build_elf_symbol_db, build_function_decl) > (build_function_type, build_array_type_def, build_enum_type_decl) > (build_class_decl, build_union_decl, build_function_tdecl) > (build_class_tdecl, build_type_composition) > (build_template_tparameter): Use > xmlFirstElementChild/xmlNextElementSibling rather than poking at > xmlNode::children and looping over xmlNode::next by hand. > > Signed-off-by: Dodji Seketeli I have just applied these 3 patches to master. I forgot to do this after I posted the patches and saw no follow-up here. Thanks for the review! [...] Cheers, --=20 Dodji