[Spice-commits] 2 commits - doc/reference src/channel-main.h src/spice-audio.h src/spice-channel.h src/spice-util.c src/spice-util.h src/usb-device-manager.h
Marc-André Lureau
elmarco at kemper.freedesktop.org
Thu Jun 15 13:49:29 UTC 2017
doc/reference/spice-gtk-sections.txt | 3 ---
src/channel-main.h | 8 ++++----
src/spice-audio.h | 2 +-
src/spice-channel.h | 5 ++---
src/spice-util.c | 3 +--
src/spice-util.h | 10 ----------
src/usb-device-manager.h | 2 +-
7 files changed, 9 insertions(+), 24 deletions(-)
New commits:
commit b1cdd014d1e50646c864966e5102cff84318ffe2
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Thu Jun 15 15:45:38 2017 +0400
util: replace SPICE_BYTESWAP16 with GUINT16_SWAP_LE_BE
SPICE_BYTESWAP* macros where introduced at a time when spice didn't
depend on glib (that feels quite long ago). Those macros seem to be
copied & adapted from glib.
In any case, that's the only direct user in spice-gtk, we can use the
glib version instead, so one day SPICE_BYTESWAP* could eventually be
removed.
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/src/spice-util.c b/src/spice-util.c
index 86377b6..f5a35ed 100644
--- a/src/spice-util.c
+++ b/src/spice-util.c
@@ -23,7 +23,6 @@
#include <string.h>
#include <glib.h>
#include <glib-object.h>
-#include <spice/macros.h>
#include "spice-util-priv.h"
#include "spice-util.h"
#include "spice-util-priv.h"
@@ -275,7 +274,7 @@ guint16 spice_make_scancode(guint scancode, gboolean release)
scancode |= 0x80;
if (scancode < 0x100)
return scancode;
- return SPICE_BYTESWAP16(0xe000 | (scancode - 0x100));
+ return GUINT16_SWAP_LE_BE(0xe000 | (scancode - 0x100));
}
typedef enum {
commit da97aed71ef136fb25eddafaeddd9e56d3f8925c
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Thu Jun 15 15:43:51 2017 +0400
build-sys: replace SPICE_DEPRECATED with G_DEPRECATED
The generic G_DEPRECATED* macros got introduced in 2.32, and spice-gtk
depends on 2.36. We can drop our own.
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt
index ebc2845..d5538d8 100644
--- a/doc/reference/spice-gtk-sections.txt
+++ b/doc/reference/spice-gtk-sections.txt
@@ -434,10 +434,7 @@ spice_uuid_to_string
SPICE_DEBUG
spice_util_get_debug
SPICE_RESERVED_PADDING
-SPICE_DEPRECATED_FOR
spice_g_signal_connect_object
-SPICE_DEPRECATED
-SPICE_GNUC_DEPRECATED_FOR
</SECTION>
<SECTION>
diff --git a/src/channel-main.h b/src/channel-main.h
index 3fe8df1..2bb6d10 100644
--- a/src/channel-main.h
+++ b/src/channel-main.h
@@ -101,13 +101,13 @@ gboolean spice_main_file_copy_finish(SpiceMainChannel *channel,
void spice_main_request_mouse_mode(SpiceMainChannel *channel, int mode);
#ifndef SPICE_DISABLE_DEPRECATED
-SPICE_DEPRECATED_FOR(spice_main_clipboard_selection_grab)
+G_DEPRECATED_FOR(spice_main_clipboard_selection_grab)
void spice_main_clipboard_grab(SpiceMainChannel *channel, guint32 *types, int ntypes);
-SPICE_DEPRECATED_FOR(spice_main_clipboard_selection_release)
+G_DEPRECATED_FOR(spice_main_clipboard_selection_release)
void spice_main_clipboard_release(SpiceMainChannel *channel);
-SPICE_DEPRECATED_FOR(spice_main_clipboard_selection_notify)
+G_DEPRECATED_FOR(spice_main_clipboard_selection_notify)
void spice_main_clipboard_notify(SpiceMainChannel *channel, guint32 type, const guchar *data, size_t size);
-SPICE_DEPRECATED_FOR(spice_main_clipboard_selection_request)
+G_DEPRECATED_FOR(spice_main_clipboard_selection_request)
void spice_main_clipboard_request(SpiceMainChannel *channel, guint32 type);
#endif
diff --git a/src/spice-audio.h b/src/spice-audio.h
index 01f564a..ce15eca 100644
--- a/src/spice-audio.h
+++ b/src/spice-audio.h
@@ -104,7 +104,7 @@ GType spice_audio_get_type(void);
SpiceAudio* spice_audio_get(SpiceSession *session, GMainContext *context);
#ifndef SPICE_DISABLE_DEPRECATED
-SPICE_DEPRECATED_FOR(spice_audio_get)
+G_DEPRECATED_FOR(spice_audio_get)
SpiceAudio* spice_audio_new(SpiceSession *session, GMainContext *context, const char *name);
#endif
diff --git a/src/spice-channel.h b/src/spice-channel.h
index aa0d9cb..f79ec49 100644
--- a/src/spice-channel.h
+++ b/src/spice-channel.h
@@ -24,7 +24,6 @@
#include <gio/gio.h>
-#include <spice/macros.h>
#include "spice-types.h"
#include "spice-glib-enums.h"
#include "spice-util.h"
@@ -137,9 +136,9 @@ gboolean spice_channel_test_common_capability(SpiceChannel *channel, guint32 cap
void spice_channel_flush_async(SpiceChannel *channel, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
gboolean spice_channel_flush_finish(SpiceChannel *channel, GAsyncResult *result, GError **error);
#ifndef SPICE_DISABLE_DEPRECATED
-SPICE_GNUC_DEPRECATED
+G_DEPRECATED
void spice_channel_set_capability(SpiceChannel *channel, guint32 cap);
-SPICE_GNUC_DEPRECATED
+G_DEPRECATED
void spice_channel_destroy(SpiceChannel *channel);
#endif
diff --git a/src/spice-util.h b/src/spice-util.h
index a2a7683..1d80f1c 100644
--- a/src/spice-util.h
+++ b/src/spice-util.h
@@ -40,16 +40,6 @@ gchar* spice_uuid_to_string(const guint8 uuid[16]);
#define SPICE_RESERVED_PADDING (10 * sizeof(void*))
-/* need to be in a public header */
-#ifndef SPICE_DEPRECATED_FOR
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
-#define SPICE_DEPRECATED_FOR(f) \
- __attribute__((deprecated("Use " #f " instead")))
-#else
-#define SPICE_DEPRECATED_FOR(f) G_GNUC_DEPRECATED
-#endif /* __GNUC__ */
-#endif
-
G_END_DECLS
#endif /* SPICE_UTIL_H */
diff --git a/src/usb-device-manager.h b/src/usb-device-manager.h
index 41f20d8..773208f 100644
--- a/src/usb-device-manager.h
+++ b/src/usb-device-manager.h
@@ -131,7 +131,7 @@ gboolean spice_usb_device_manager_disconnect_device_finish(
SpiceUsbDeviceManager *self, GAsyncResult *res, GError **err);
#ifndef SPICE_DISABLE_DEPRECATED
-SPICE_DEPRECATED_FOR(spice_usb_device_manager_disconnect_device_async)
+G_DEPRECATED_FOR(spice_usb_device_manager_disconnect_device_async)
void spice_usb_device_manager_disconnect_device(SpiceUsbDeviceManager *manager,
SpiceUsbDevice *device);
#endif
More information about the Spice-commits
mailing list