Skip to content

Commit a790483

Browse files
committed
jim: introduce jim_begin()
1 parent effbdc9 commit a790483

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

jim2.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ typedef struct {
4040
// Introduce a separate boolean flag in the Jim struct to enable/disable
4141
// the pretty-printing.
4242

43+
void jim_begin(Jim *jim);
4344
void jim_null(Jim *jim);
4445
void jim_bool(Jim *jim, int boolean);
4546
void jim_integer(Jim *jim, long long int x);
@@ -121,6 +122,12 @@ static int jim_get_utf8_char_len(unsigned char ch)
121122
}
122123
}
123124

125+
void jim_begin(Jim *jim)
126+
{
127+
jim->sink_count = 0;
128+
jim->scopes_count = 0;
129+
}
130+
124131
void jim_element_begin(Jim *jim)
125132
{
126133
Jim_Scope *scope = jim_current_scope(jim);

0 commit comments

Comments
 (0)