chiark / gitweb /
midend_deserialise: accept an extra validation function.
authorSimon Tatham <anakin@pobox.com>
Sun, 1 Oct 2017 08:59:50 +0000 (09:59 +0100)
committerSimon Tatham <anakin@pobox.com>
Sun, 1 Oct 2017 09:38:01 +0000 (10:38 +0100)
commit9e62c710dfba0596eb355b95c46fd5153f5fe13d
tree7a097e15c860d5a9b9371da6bc76b6672c0cff2d
parentc0503d48738851ac31cd49ee98afa4f3e431d64a
midend_deserialise: accept an extra validation function.

This will let me do a 'conditional deserialisation' operation, in
which we fully decode the serialised data and then (assuming that gave
no errors) decide whether or not to actually install it based on some
arbitrary condition.

I don't think there's any possible use for the extra check function
_outside_ midend.c, so I've left the API for front ends as it is; the
externally visible midend_deserialise() doesn't have the new
parameter, and only midend_deserialise_internal() includes it.
midend.c