wip: make wl_array arguments const

Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/189
This commit is contained in:
Simon Ser 2021-01-08 19:13:33 +01:00
parent 69b8eaf385
commit ead58945cd
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 3 additions and 3 deletions

View file

@ -527,7 +527,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);

View file

@ -1114,7 +1114,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;
}
}

View file

@ -687,7 +687,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` */
};