[PATCH] sid/sim: constify sim_machs storage
Mike Frysinger
vapier@gentoo.org
Fri Sep 10 21:59:17 GMT 2021
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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/cgen/attachments/20210910/71ddef61/attachment.sig>
More information about the Cgen
mailing list