Make json_error_t transparent again
After looking at the new code for a few days, I didn't like it
anymore. To prepare for the future, a few fields will be added to the
json_error_t struct later.
This reverts commit 23dd078c8d. Some
adjustments were needed because of newer commits.
This commit is contained in:
@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
|
||||
size_t flags = 0;
|
||||
|
||||
json_t *json;
|
||||
json_error_t *error;
|
||||
json_error_t error;
|
||||
|
||||
if(argc != 1) {
|
||||
fprintf(stderr, "usage: %s\n", argv[0]);
|
||||
@@ -61,10 +61,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
json = json_loadf(stdin, 0, &error);
|
||||
if(!json) {
|
||||
fprintf(stderr, "%d\n%s\n",
|
||||
json_error_line(error),
|
||||
json_error_msg(error));
|
||||
free(error);
|
||||
fprintf(stderr, "%d\n%s\n", error.line, error.text);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user