Nick Mathewson
c390efe84f
A few more test cases and unreachable lines
2019-06-25 12:51:25 -04:00
Nick Mathewson
a91ed23403
Use structvar to find the types for config vars.
2019-06-25 12:51:25 -04:00
Nick Mathewson
2da188667d
Add new "struct_var_" functions to manipulate struct fields.
...
These functions exist one level higher than typed_var_t. They
describe a type, a name, and an offset within a structure.
2019-06-25 12:51:25 -04:00
Nick Mathewson
705bda859e
Add unit tests for the unitparse.c module.
2019-06-24 17:50:43 -04:00
Nick Mathewson
c60a85d22a
Add a "typed_var" abstraction to implement lvalue access in C.
...
Right now, this has been done at a high level by confparse.c, but it
makes more sense to lower it.
This API is radically un-typesafe as it stands; we'll be wrapping it
in a safer API as we do #30914 and lower the struct manipulation
code as well.
Closes ticket 30864.
2019-06-24 17:50:43 -04:00
Nick Mathewson
458da8a80d
Move unit-parsing code to src/lib/confmgt
...
lib/confmgt is at a higher level than lib/conf, since it needs to
call down to logging and similar modules.
2019-06-24 15:11:57 -04:00