return 1;
}
-static yajl_callbacks version_callbacks = {
- NULL, /* null */
- &header_boolean, /* boolean */
- &header_integer,
- NULL, /* double */
- NULL, /* number */
- NULL, /* string */
- NULL, /* start_map */
- &header_map_key,
- NULL, /* end_map */
- NULL, /* start_array */
- NULL /* end_array */
-};
-
static void child_init(i3bar_child *child) {
child->version = 0;
child->stop_signal = SIGSTOP;
*
*/
void parse_json_header(i3bar_child *child, const unsigned char *buffer, int length, unsigned int *consumed) {
+ static yajl_callbacks version_callbacks = {
+ .yajl_boolean = header_boolean,
+ .yajl_integer = header_integer,
+ .yajl_map_key = &header_map_key,
+ };
+
child_init(child);
current_key = NO_KEY;