pyke/pyke.[ch]: Make type skeleton structures be read-only.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 20 Oct 2019 20:18:08 +0000 (21:18 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 11 Apr 2020 11:44:14 +0000 (12:44 +0100)
commitc263b05cca879ab1bdca5823df0413604d39d4c6
tree1da33823de17f7501f6f18adae399b1093973f57
parent8e923c6832d8ba26dbe9e97e5c3607debbe27566
pyke/pyke.[ch]: Make type skeleton structures be read-only.

We couldn't do this before because `INITTYPE_META' would write the
direct superclass to the `tp_base' slot in the skeleton before calling
`inittype'.  To make this work, then, we adjust `inittype' to take the
direct superclass as an extra argument and plug it into the newly
created heap-type; and `INITTYPE_META' needs adjusting to pass this
argument rather than trying to write to the skeleton directly.

Of course, then we need to actually mark the type skeletons as `const'.
17 files changed:
algorithms.c
buffer.c
bytestring.c
catacomb.c
ec.c
field.c
group.c
key.c
mp.c
passphrase.c
pgen.c
pubkey.c
pyke/mapping.c
pyke/pyke.c
pyke/pyke.h
rand.c
share.c