Skip to content

Commit ec7fe1d

Browse files
committed
jim: remove Jim_Error mechanism
1 parent 7aa4d95 commit ec7fe1d

File tree

4 files changed

+138
-222
lines changed

4 files changed

+138
-222
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ int main()
5252
jim_array_end(&jim);
5353
jim_object_end(&jim);
5454

55-
if (jim.error != JIM_OK) {
56-
fprintf(stderr, "ERROR: could not serialize json properly: %s\n",
57-
jim_error_string(jim.error));
58-
return -1;
59-
}
60-
6155
fwrite(jim.sink, jim.sink_count, 1, stdout);
6256

6357
return 0;

examples/01_from_readme.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ int main()
4343
jim_array_end(&jim);
4444
jim_object_end(&jim);
4545

46-
if (jim.error != JIM_OK) {
47-
fprintf(stderr, "ERROR: could not serialize json properly: %s\n",
48-
jim_error_string(jim.error));
49-
return -1;
50-
}
51-
5246
fwrite(jim.sink, jim.sink_count, 1, stdout);
5347

5448
return 0;

jim1.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
// Jim 1.0
22
//
3-
// This is a legacy version of jim which uses fixed array for scopes and Jim_Sink/Jim_Write
4-
// interface to abstract away the IO. Not actively supported. Please use Jim 2.0 for new projects.
3+
// This is a legacy version of jim which uses
4+
// - Fixed array for scopes,
5+
// - Jim_Sink/Jim_Write interface to abstract away the IO,
6+
// - Jim_Error mechanism for indicating IO errors and/or invalid usage of the API.
7+
//
8+
// Not actively supported. Please use Jim 2.0 for new projects. This code is preserved because 2.0 is not backward compatible with 1.0.
59
#ifndef JIM_H_
610
#define JIM_H_
711

0 commit comments

Comments
 (0)