diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-07-16 17:42:52 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-07-16 17:42:53 -0700 |
| commit | bd4232fac3319890429ec303e2f7c3d287c8eaa3 (patch) | |
| tree | b5032aca9cdafb5812801f2868cabddc23e2052a /json-writer.h | |
| parent | 832a239b72779e97b09943d77b9097ed8376e18e (diff) | |
| parent | bc40dfb10a06612813a3f9b733d65af0732208b2 (diff) | |
| download | git-bd4232fac3319890429ec303e2f7c3d287c8eaa3.tar.xz | |
Merge branch 'ab/struct-init'
Code cleanup around struct_type_init() functions.
* ab/struct-init:
string-list.h users: change to use *_{nodup,dup}()
string-list.[ch]: add a string_list_init_{nodup,dup}()
dir.[ch]: replace dir_init() with DIR_INIT
*.c *_init(): define in terms of corresponding *_INIT macro
*.h: move some *_INIT to designated initializers
Diffstat (limited to 'json-writer.h')
| -rw-r--r-- | json-writer.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/json-writer.h b/json-writer.h index 83906b09c1..209355e0f1 100644 --- a/json-writer.h +++ b/json-writer.h @@ -64,7 +64,10 @@ struct json_writer unsigned int pretty:1; }; -#define JSON_WRITER_INIT { STRBUF_INIT, STRBUF_INIT, 0, 0 } +#define JSON_WRITER_INIT { \ + .json = STRBUF_INIT, \ + .open_stack = STRBUF_INIT, \ +} void jw_init(struct json_writer *jw); void jw_release(struct json_writer *jw); |
