diff --git a/src/connection.c b/src/connection.c index b89166fb..6cb2e574 100644 --- a/src/connection.c +++ b/src/connection.c @@ -524,7 +524,7 @@ wl_argument_from_va_list(const char *signature, union wl_argument *args, args[i].o = va_arg(ap, struct wl_object *); break; case 'a': - args[i].a = va_arg(ap, struct wl_array *); + args[i].a = va_arg(ap, const struct wl_array *); break; case 'h': args[i].h = va_arg(ap, int32_t); diff --git a/src/scanner.c b/src/scanner.c index c512d231..53ef810d 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -1120,7 +1120,7 @@ emit_type(struct arg *a) printf("struct %s *", a->interface_name); break; case ARRAY: - printf("struct wl_array *"); + printf("const struct wl_array *"); break; } } diff --git a/src/wayland-util.h b/src/wayland-util.h index c99069cc..dfa0b0d0 100644 --- a/src/wayland-util.h +++ b/src/wayland-util.h @@ -681,7 +681,7 @@ union wl_argument { const char *s; /**< `string` */ struct wl_object *o; /**< `object` */ uint32_t n; /**< `new_id` */ - struct wl_array *a; /**< `array` */ + const struct wl_array *a; /**< `array` */ int32_t h; /**< `fd` */ };