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>
Mon, 25 Nov 2019 17:43:08 +0000 (17:43 +0000)
commitddd4720bd8a7e04bb37ba6825b46f1bbdce9d3e7
tree34d7d7fa0c5befb31a23cf44bd9e1481b7aba68a
parent3ed16ce3e1b50da2a4b18637d40775a52b3a2c74
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