aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-11-08 16:52:31 +0100
committerPatrick Steinhardt <ps@pks.im>2019-11-08 16:58:36 +0100
commit0837288b7c6dbd3c015f6a184cfa1e99937c5d09 (patch)
treecdf2da8d124c9c4f6dbc511c3497a13257586b44 /README.md
parent85695f3d5903b1cd5b4030efe50db3b4f5f3c928 (diff)
jsmn: declare struct names to allow forward decls
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.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions