@@ -50,7 +50,8 @@ static json_object *get_focused_container_r(json_object *c) {
5050 } else {
5151 json_object * nodes , * node , * child ;
5252 json_object_object_get_ex (c , "nodes" , & nodes );
53- for (json_ar_len_t i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
53+ int i ;
54+ for (i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
5455 node = json_object_array_get_idx (nodes , i );
5556
5657 if ((child = get_focused_container_r (node ))) {
@@ -59,7 +60,7 @@ static json_object *get_focused_container_r(json_object *c) {
5960 }
6061
6162 json_object_object_get_ex (c , "floating_nodes" , & nodes );
62- for (json_ar_len_t i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
63+ for (i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
6364 node = json_object_array_get_idx (nodes , i );
6465
6566 if ((child = get_focused_container_r (node ))) {
@@ -82,7 +83,7 @@ char *get_focused_output() {
8283 if (!outputs ) {
8384 sway_abort ("Unabled to get focused output. No nodes in tree." );
8485 }
85- for (json_ar_len_t i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
86+ for (int i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
8687 output = json_object_array_get_idx (outputs , i );
8788
8889 if (get_focused_container_r (output )) {
@@ -130,7 +131,7 @@ json_object *get_output_container(const char *output) {
130131 json_object * outputs , * json_output , * name ;
131132 json_object_object_get_ex (tree , "nodes" , & outputs );
132133
133- for (json_ar_len_t i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
134+ for (int i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
134135 json_output = json_object_array_get_idx (outputs , i );
135136 json_object_object_get_ex (json_output , "name" , & name );
136137
0 commit comments