aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2024-06-29 15:05:00 +0300
committerSimon Ser <contact@emersion.fr>2024-08-09 20:25:11 +0000
commita6a4e081da12140ffe1881d83be0981966ba6daf (patch)
treee9378ea95e2bcf7965fbd12a24ba7f5f8d5f7876 /src
parentclient: Handle proxies with no queue (diff)
downloadwayland-a6a4e081da12140ffe1881d83be0981966ba6daf.tar
wayland-a6a4e081da12140ffe1881d83be0981966ba6daf.tar.gz
wayland-a6a4e081da12140ffe1881d83be0981966ba6daf.tar.bz2
wayland-a6a4e081da12140ffe1881d83be0981966ba6daf.tar.lz
wayland-a6a4e081da12140ffe1881d83be0981966ba6daf.tar.xz
wayland-a6a4e081da12140ffe1881d83be0981966ba6daf.tar.zst
wayland-a6a4e081da12140ffe1881d83be0981966ba6daf.zip
Put WL_DEPRECATED in front of the function declarations
This fixes the following clang error when using C23: ../src/wayland-server-core.h:680:41: error: 'deprecated' attribute cannot be applied to types 680 | int32_t stride, uint32_t format) WL_DEPRECATED; | ^ ../src/wayland-util.h:52:25: note: expanded from macro 'WL_DEPRECATED' 52 | #define WL_DEPRECATED [[deprecated]] | ^ Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
Diffstat (limited to 'src')
-rw-r--r--src/wayland-server-core.h3
-rw-r--r--src/wayland-server.c15
-rw-r--r--src/wayland-server.h15
3 files changed, 22 insertions, 11 deletions
diff --git a/src/wayland-server-core.h b/src/wayland-server-core.h
index 63d0f02..fb900a9 100644
--- a/src/wayland-server-core.h
+++ b/src/wayland-server-core.h
@@ -674,10 +674,11 @@ wl_display_init_shm(struct wl_display *display);
uint32_t *
wl_display_add_shm_format(struct wl_display *display, uint32_t format);
+WL_DEPRECATED
struct wl_shm_buffer *
wl_shm_buffer_create(struct wl_client *client,
uint32_t id, int32_t width, int32_t height,
- int32_t stride, uint32_t format) WL_DEPRECATED;
+ int32_t stride, uint32_t format);
void
wl_log_set_handler_server(wl_log_func_t handler);
diff --git a/src/wayland-server.c b/src/wayland-server.c
index 95f69e7..2fe69af 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -2484,9 +2484,10 @@ wl_priv_signal_final_emit(struct wl_priv_signal *signal, void *data)
/** \cond */ /* Deprecated functions below. */
+WL_DEPRECATED
uint32_t
wl_client_add_resource(struct wl_client *client,
- struct wl_resource *resource) WL_DEPRECATED;
+ struct wl_resource *resource);
WL_EXPORT uint32_t
wl_client_add_resource(struct wl_client *client,
@@ -2515,11 +2516,12 @@ wl_client_add_resource(struct wl_client *client,
return resource->object.id;
}
+WL_DEPRECATED
struct wl_resource *
wl_client_add_object(struct wl_client *client,
const struct wl_interface *interface,
const void *implementation,
- uint32_t id, void *data) WL_DEPRECATED;
+ uint32_t id, void *data);
WL_EXPORT struct wl_resource *
wl_client_add_object(struct wl_client *client,
@@ -2538,10 +2540,11 @@ wl_client_add_object(struct wl_client *client,
return resource;
}
+WL_DEPRECATED
struct wl_resource *
wl_client_new_object(struct wl_client *client,
const struct wl_interface *interface,
- const void *implementation, void *data) WL_DEPRECATED;
+ const void *implementation, void *data);
WL_EXPORT struct wl_resource *
wl_client_new_object(struct wl_client *client,
@@ -2600,10 +2603,11 @@ wl_client_get_user_data(struct wl_client *client)
return client->data;
}
+WL_DEPRECATED
struct wl_global *
wl_display_add_global(struct wl_display *display,
const struct wl_interface *interface,
- void *data, wl_global_bind_func_t bind) WL_DEPRECATED;
+ void *data, wl_global_bind_func_t bind);
WL_EXPORT struct wl_global *
wl_display_add_global(struct wl_display *display,
@@ -2613,9 +2617,10 @@ wl_display_add_global(struct wl_display *display,
return wl_global_create(display, interface, interface->version, data, bind);
}
+WL_DEPRECATED
void
wl_display_remove_global(struct wl_display *display,
- struct wl_global *global) WL_DEPRECATED;
+ struct wl_global *global);
WL_EXPORT void
wl_display_remove_global(struct wl_display *display, struct wl_global *global)
diff --git a/src/wayland-server.h b/src/wayland-server.h
index 1be565f..48fab1d 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -70,30 +70,35 @@ struct wl_resource {
void *data;
};
+WL_DEPRECATED
uint32_t
wl_client_add_resource(struct wl_client *client,
- struct wl_resource *resource) WL_DEPRECATED;
+ struct wl_resource *resource);
+WL_DEPRECATED
struct wl_resource *
wl_client_add_object(struct wl_client *client,
const struct wl_interface *interface,
const void *implementation,
- uint32_t id, void *data) WL_DEPRECATED;
+ uint32_t id, void *data);
+WL_DEPRECATED
struct wl_resource *
wl_client_new_object(struct wl_client *client,
const struct wl_interface *interface,
- const void *implementation, void *data) WL_DEPRECATED;
+ const void *implementation, void *data);
+WL_DEPRECATED
struct wl_global *
wl_display_add_global(struct wl_display *display,
const struct wl_interface *interface,
void *data,
- wl_global_bind_func_t bind) WL_DEPRECATED;
+ wl_global_bind_func_t bind);
+WL_DEPRECATED
void
wl_display_remove_global(struct wl_display *display,
- struct wl_global *global) WL_DEPRECATED;
+ struct wl_global *global);
#endif