Both `jsmntok_t` and `jsmn_parser` are declared as anonymous structures that are typedeffed to their actual name. This forces all downstream users of jsmn to always use the typedef name, instead of using e.g. `struct jsmn_parser`. While this might be considered a matter of taste, using typedefs only has the technical downside of disallowing forward declarations. E.g. if a dependent whishes to declare a pointer to `jsmntok_t` without actually pulling in the "jsmn.h" header, then he is not able to do so because there is no way in C to provide a forward declaration for typedefs to anonymous structs. Fix this by providing names for both `jsmntok_t` and `jsmn_parser` structures.master^2
parent
85695f3d59
commit
0837288b7c
Loading…
Reference in new issue