Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json_config struct forward declaration error #29

Open
myfoundation opened this issue Jan 26, 2025 · 1 comment
Open

json_config struct forward declaration error #29

myfoundation opened this issue Jan 26, 2025 · 1 comment

Comments

@myfoundation
Copy link

myfoundation commented Jan 26, 2025

In json.h
typedef struct { ... } json_config;
but must be
typedef struct json_config { ... } json_config;

So we have compiler error when do forward declaration in this case:

`
struct json_config;
json_config* config;

#include "json.h"
`

The json_parser and json_printer structs defined correctly.
`
typedef struct json_parser {
...
} json_parser;

typedef struct json_printer {
...
} json_printer;
`

@QuintinHee
Copy link

QuintinHee commented Jan 26, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants