From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 09131385801D for ; Tue, 14 Sep 2021 19:02:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 09131385801D Received: from fencepost.gnu.org ([2001:470:142:3::e]:35278) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQDhS-0007Ci-Vn for cgen@sourceware.org; Tue, 14 Sep 2021 15:02:35 -0400 Received: from [141.143.193.79] (port=24004 helo=termi.gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQDhM-0004QC-Jk for cgen@sourceware.org; Tue, 14 Sep 2021 15:02:34 -0400 From: "Jose E. Marchesi" To: cgen@sourceware.org Subject: Re: [PATCH] sid/sim: constify sim_machs storage References: <20210628153420.25536-1-vapier@gentoo.org> Date: Tue, 14 Sep 2021 21:02:25 +0200 In-Reply-To: (Mike Frysinger via Cgen's message of "Fri, 10 Sep 2021 17:59:17 -0400") Message-ID: <87pmtb56bi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cgen@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cgen mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2021 19:02:36 -0000 > ping ... > > On 28 Jun 2021 11:34, Mike Frysinger via Cgen wrote: >> The array itself is read-only, so mark it const. >> --- >> sid.scm | 2 +- >> sim.scm | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/sid.scm b/sid.scm >> index d6d6ed30a890..c34338371d82 100644 >> --- a/sid.scm >> +++ b/sid.scm >> @@ -1361,7 +1361,7 @@ >> >> (define (/gen-mach-data) >> (string-append >> - "const MACH *sim_machs[] =\n{\n" >> + "const MACH * const sim_machs[] =\n{\n" >> (string-map (lambda (mach) >> (gen-obj-sanitize >> mach >> diff --git a/sim.scm b/sim.scm >> index f965ef1fcb17..a153f8cee720 100644 >> --- a/sim.scm >> +++ b/sim.scm >> @@ -1475,7 +1475,7 @@ >> >> (define (/gen-mach-data) >> (string-append >> - "const SIM_MACH *sim_machs[] =\n{\n" >> + "const SIM_MACH * const sim_machs[] =\n{\n" >> (string-map (lambda (mach) >> (gen-obj-sanitize >> mach >> -- >> 2.31.1 >> This LGTM.