gpgscm: Make global data constant when possible.
authorJustus Winter <justus@g10code.com>
Thu, 23 Mar 2017 11:50:27 +0000 (12:50 +0100)
committerJustus Winter <justus@g10code.com>
Fri, 7 Apr 2017 11:11:31 +0000 (13:11 +0200)
commitc9c3fe883271868d3b2dd287d295cf6a8f8ffc05
tree55a4ff092a914f3320bc7546a1f2ea0a15cf0cbb
parent56638c28adc1bbe9fc052b92549a50935c0fe99c
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>
tests/gpgscm/scheme-private.h
tests/gpgscm/scheme.c