Skip to content
Commit 9466ec13 authored by Zbigniew Jędrzejewski-Szmek's avatar Zbigniew Jędrzejewski-Szmek
Browse files

core: add helper macros for deserialization

A helper function would seem more natural, but there are two reasons why a
macro is needed:
- many bool fields are bitfields, so we can't take a pointer, and using a macro
  allows us to avoid taking a pointer.
- we have a few diffent types (bool, uint64_t, FreezerState), and we can have
  type safety without specifying the type by using the macro.

This also makes the error messages more informative: they print the exact field
identifier that failed, which is more useful for debugging than a description.
parent 2d3b784d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment