Home GnuPG

gpgscm: Make global data constant when possible.

Description

gpgscm: Make global data constant when possible.

* tests/gpgscm/scheme-private.h (struct scheme): Make 'vptr' const.
* tests/gpgscm/scheme.c (num_zero): Statically initialize and turn
into constant.
(num_one): Likewise.
(charnames): Change type so that it can be stored in rodata.
(is_ascii_name): Adapt slightly.
(assign_proc): Make argument const char *.
(op_code_info): Make some fields const char *.
(tests): Make const.
(dispatch_table): Make const.  At least it can be made read-only after
relocation.
(Eval_Cycle): Adapt slightly.
(vtbl): Make const.
  • Signed-off-by: Justus Winter <justus@g10code.com>

Details

Provenance
justusAuthored on Mar 23 2017, 12:50 PM
Parents
rE961f3b3a3001: gpgscm: Remove arbitrary limit on number of cell segments.
Branches
Unknown
Tags
Unknown